T
T
Technosa2020-11-27 15:57:29
PyCharm
Technosa, 2020-11-27 15:57:29

Why isn't PyCharm picking up the virtual environment (venv)?

I create a virtual environment through the terminal in Windows, or through the terminal in PyCharm. I open the project in PyCharm, it sees the virtual environment, the postscript (venv) is visible to the left of the path, the path to the interpreter is also indicated in the project settings. But after entering the "pip list" command, it lists global packages, not local ones for this project, and accordingly any commands to install packages, etc., pass for the global environment.

If I go to the local environment path in the PyCharm terminal and manually activate the virtual machine again, then everything will work, but only for one window (terminal) in which I did this action, and all commands will already work in relation to this environment.

Therefore, the question is how to make PyCharm automatically pick up the virtual machine when opening the project without dancing with a tambourine, and, accordingly, so that the commands pass in all new open terminal windows in relation to this virtual environment?

PS You can visually see what it picks up, and you can add packages through the interpreter settings, BUT the terminal in PyCharm is connected to the global environment at the same time, and working with the virtual machine is not possible.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
javedimka, 2020-11-27
@javedimka

He picks it up.
File -> Settings -> Project -> Project interpreter and there already see the list of your packages, and install through the same interface.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question