I was wondering How can I stop python from installing modules in specific virtual environment and install them globally;or probably virtaulenv won't let me do that!?
-
use `deactivate` command – Yonas Kassa Oct 25 '20 at 07:30
3 Answers
if you have (venv)
before you terminal input, your virtual environment is activates. so you can using deactivate
command for deactivating. in addition if you have a (base)
you should be closing your anaconda base environment so you can see this answer

- 127
- 9
You simply install the package without activating your virtual environment. Once you install your package that way, it would be installed globally instead of inside a global environment.
Also, to confirm this, you can activate your virtual environment and run the command pip list
, this will show all the packages in that virtual environment, and also try deactivating the virtual environment and run the command pip list
, this would show all packages in the system.
I hope this answers your question

- 741
- 2
- 17
-
it installs all packages without active venv in specific virtual environment – Alin Oct 26 '20 at 13:42
-
isn't that what you wanted, if not maybe you should be more concise as regards what you want. Thanks – coderboy Oct 26 '20 at 15:04
I believe I've found some sort of solution ,by just typing "pip install -target C:\Users\YOURNAME\AppData\Roaming\Python\Python37\site-packages" it's kind of a lame solution but I think it's better than nothing! By the way there was no pip.exe in my python folder!!!

- 85
- 1
- 8