Answer the question
In order to leave comments, you need to log in
Why is the wrong virtual environment activated?
I create a directory, navigate through it on the command line.
Next, I write the command:
virtualenv -p "C:\Users\User\AppData\Local\Programs\Python\Python310\python.exe" "C:\Новая папка\test\venv"
venv\Scripts\activate
. In the console, the path appears before the (venv)
. Everything seems to be fine, but when I write pip freeze
, I get the output of libraries that are installed in a completely different version of Python, and which are not in the venv\Lib\site-packages
. When I try to install the library, it tells me that it is already installed, but again it is not in the virtual environment. How to solve this problem?
Answer the question
In order to leave comments, you need to log in
There may be a problem in the space "New folder"
If not, then transfer the library from that version of Python to the virtual environment
And also try to go to file -> Settings -> project: 'Project name' -> Python intrepetator -> there will be an intrepetator choice and will be plus sign for adding libraries (if it's PyCharm)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question