Reputation: 621
For whatever lame reason, I have a bunch of different versions of python installed. The one I want to use (and what my current $PATH is using) is at /opt/python2.6/bin/python. How do I install 'pip' for this version so when I do a 'pip install package' it goes to the right location?
Upvotes: 0
Views: 246
Reputation: 67227
When you have multiple versions of Python with pip installed, you can launch pip using your Python executable:
$python2.6 -m pip [pip-args]
To install pip for a specific Python version, run get-pip.py
(https://bootstrap.pypa.io/get-pip.py) with the respective Python executable:
$python2.6 get-pip.py
Upvotes: 1