1

I am using a raspberry pi 2 board with Raspian. In order to be consistent with my mac I created a separate version of Python v2.7.10. I installed a number of packages that where recommended and I was able to compile it. I placed it in /usr/local/opt/Python2.7.10. I then updated my path environment so that this directory comes first. The original Python 2.7.3 is located at /usr/bin

Now I need to get pip installed. I downloaded get-pip.py and executed it. pip was installed in /usr/local/bin, which is not where either versions of Python exists. This doesn't look right to me. I am not sure if this pip is for the original Python or for the newer version of Python that I created. I just don't want to mix the two. Is this the correct location or do I need to get it somewhere in /usr/local/opt/? I am not sure how to get pip to install in /usr/local/opt/Python2.7.10/bin.

Rowel
  • 115
  • 2
  • 11
Hapa
  • 11
  • 2

1 Answers1

0

pip: dealing with multiple Python versions?

To use pip on a specific Python, you need to make sure you have downloaded pip and installed pip for that python version:

curl -O https://bootstrap.pypa.io/get-pip.py
/path/to/python27 get-pip.py

Then use specific pip version to install packages:

pip2.7 install somePackage
Jesse
  • 21
  • 3