Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call correct pip in pyvenv environment python3.4

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?

like image 954
hY8vVpf3tyR57Xib Avatar asked Nov 10 '22 05:11

hY8vVpf3tyR57Xib


1 Answers

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
like image 54
Josh Graham Avatar answered Nov 14 '22 23:11

Josh Graham