FinnM
FinnM

Reputation: 411

Virtualenv is not creating a local pip and I really need it to

Title says most. Here's what's going on...

~/project/path~$ python3 -m venv project-env
~/project/path~$ source project-env/bin/activate
(project-env) ~/project/path~$ pip -V
pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages (python 3.3)

What the hell, shouldn't pip be loading from ~/project/path/project-env/bin/pip?

(project-env) ~/project/path~$ ls -al project-env/bin/
total 24
drwxr-xr-x  5 user  staff   170B Jun 30 21:41 .
drwxr-xr-x  6 user  staff   204B Jun 30 21:41 ..
-rw-rw-r--  1 user  staff   2.1K Jun 30 21:41 activate
lrwxr-xr-x  1 user  staff     7B Jun 30 21:41 python -> python3
lrwxr-xr-x  1 user  staff    22B Jun 30 21:41 python3 -> /usr/local/bin/python3

Ohhh, that's why, there's no local pip =(.

How can I configure the command python3 -m venv project-env to always load a local pip3? The fact pip isn't being loaded in by default is blasphemy.

Thanks in advance! =)

Upvotes: 0

Views: 118

Answers (1)

FinnM
FinnM

Reputation: 411

Solution was found courtesy of achampion's comment. Python versions 3.4 and newer have this functionality. Using python3.6 for this task solved my issue.

Upvotes: 1

Related Questions