2

I'm using OS X 10.11 El Capitan.

I have just installed Python 3.5 with Homebrew: brew install python3.

which python3 gives me the location /usr/local/bin/python3.

But when I try which pip3 I get the location /Library/Frameworks/Python.framework/Versions/3.4/bin/pip3.

How do I link pip3 to work with my Homebrew Python3 install?

2

For a Python 3.5 install the corresponding pip (which should get automatically installed), is pip3.5. So you should be able to use it by just that command. (If that doesn't work try /usr/local/bin/pip3.5 or /usr/local/bin/pip`, but the latter would IMO be an error in the packaging)

In most multi version Python installations you can get the specific minor version of both python and pip by using pythonX.Y resp. pipX.Y, with X being the major version number and Y being the minor version number.

  • Thanks for your reply! I think I solved the problem by editing .bash_profile and adding export PATH="/usr/local/bin:$PATH". However since my etc/paths already was properly ordered I'm not sure if this really should've been necessary. – Winterflags Oct 2 '15 at 16:10
  • 1
    @Winterflags I think that path was already in, otherwise which python3 would probably not have found /usr/local/bin/python3, so you might want to check your path (echo $PATH) if /usr/local/bin is in there twice. (it cannot hurt, but it is messy IMO if the same path is there twice) – Anthon Oct 2 '15 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.