-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python env does not allow to use pip before and after activated #874
Comments
In my experience, pip works fine with virtual environments as long as you don’t run it inside the directory of the virtual environment. |
Okey, so what’s the point of having virtual environments if I can’t pip in it? I had to copy the usage of virtual environment to explain why it shouldn’t be happening. Please, feel free to read the information from doc.python.org
|
To clarify: once you have activated the virtual environment, running pip will install packages in the virtual environment. So you can add more packages, and so on. pip will install packages in the active virtual environment (background_process in your case). The issue (which I'm trying to fix, but it's difficult) is just that the current working directory while running pip has to be outside of the directory of the virtual environment. To recap: ~/Documents > source background_process/bin/activate
(background_process) ~/Documents > pip install lots-of-packages
(...)
(background_process) ~/Documents > pip list --user
(background_process) ~/Documents > Hope this helps. |
@N-Holzschuch,
Found an issue on python -m venv where I can’t use pip to install anything.
Because of that, can’t :
The reason why is that happened is because virtual environments are created by default without pip.
Did some researches on pyvenv.cnf file and found that python-venv module runs this runs
python3 -m venv --copies --without-pip
by default.According to help file, since we can’t install a new pip because it cames by default, I guess we should be shared this module, unless I misunderstood the real reason behind virtual environments.
The text was updated successfully, but these errors were encountered: