I installed a new pyvenv environment with the following commands:
python3.4 -m venv env
source env/bin/activate
However, when I call which pip
, I get the following: /usr/bin/pip
. Apparently, the system wide pip installation is still used. If I look at the pyvenv documentation, it states the following:
Changed in version 3.4: Installs pip by default, added the --without-pip and --copies options
And this is correct, when trying to install pip in my activated environment, I get the following:
Requirement already up-to-date: pip in ./env/local/lib/python3.4/dist-packages
How do I make sure that when I call pip in my activated environment, pyvenv pip is called?
Looks like you (and I in my previous answer) were seeing the effects of a bug. Everything seems to be working in the newer versions of pyvenv-3.4.
$ pwd
~/test
$ pyvenv-3.4 myenv
$ source myenv/bin/activate
(myenv)$ which pip
~/test/myenv/bin/pip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With