Are you activating your virtual environment before you try to install packages? If not, you are trying to install the packages into your system python.
If you are using the cmd shell in windows, run the "activate.bat" file in your virtual environment\Scripts folder.
If you are using the powershell in windows, run the "Activate.ps1" file in your virtual environment\Scripts folder.
If you are using Linux or MacOS run the "activate" file in your virtual environment/bin/activate folder.
In all examples above "virtual environment" refers to the path to your virtual environment.
You can configure most IDE's to automatically activate your virtual environment. How this is done depends on what IDE you are using. In Linux you can configure automatic activation of your virtual environment when you enter a specific folder.
To learn more about activating virtual environments:
https://python.land/virtual-environments/virtualenv