0

I installed Python using Homebrew. This means I should get PIP installed as a result of:

brew python install

The reason i want to use PIP from the Python Homebrew installation is because i don't want the headache of having to maintain multiple library repositories. I want all the Python libs I install using PIP to be in /usr/local/Cellar/python2.7.11/

Doing a

brew list python

I get the following output

usr/local/Cellar/python/2.7.11/bin/2to3
/usr/local/Cellar/python/2.7.11/bin/2to3-2
/usr/local/Cellar/python/2.7.11/bin/2to3-2.7
/usr/local/Cellar/python/2.7.11/bin/idle
/usr/local/Cellar/python/2.7.11/bin/idle2
/usr/local/Cellar/python/2.7.11/bin/idle2.7
/usr/local/Cellar/python/2.7.11/bin/pydoc
/usr/local/Cellar/python/2.7.11/bin/pydoc2
/usr/local/Cellar/python/2.7.11/bin/pydoc2.7
/usr/local/Cellar/python/2.7.11/bin/python
/usr/local/Cellar/python/2.7.11/bin/python-config
/usr/local/Cellar/python/2.7.11/bin/python2
/usr/local/Cellar/python/2.7.11/bin/python2-config
/usr/local/Cellar/python/2.7.11/bin/python2.7
/usr/local/Cellar/python/2.7.11/bin/python2.7-config
/usr/local/Cellar/python/2.7.11/bin/pythonw
/usr/local/Cellar/python/2.7.11/bin/pythonw2
/usr/local/Cellar/python/2.7.11/bin/pythonw2.7
/usr/local/Cellar/python/2.7.11/bin/smtpd.py
/usr/local/Cellar/python/2.7.11/bin/smtpd2.7.py
/usr/local/Cellar/python/2.7.11/bin/smtpd2.py
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/ (3575 files)
/usr/local/Cellar/python/2.7.11/IDLE.app/Contents/ (8 files)
/usr/local/Cellar/python/2.7.11/lib/pkgconfig/ (3 files)
/usr/local/Cellar/python/2.7.11/libexec/pip/ (279 files)
/usr/local/Cellar/python/2.7.11/libexec/setuptools/ (136 files)
/usr/local/Cellar/python/2.7.11/libexec/wheel/ (54 files)
/usr/local/Cellar/python/2.7.11/Python Launcher.app/Contents/ (17 files)
/usr/local/Cellar/python/2.7.11/share/man/ (3 files)
/usr/local/Cellar/python/2.7.11/share/python/ (315 files)

I can't seem to see pip in /usr/local/Cellar/python/2.7.11/bin

Of course I also tried to install pip myself using

python get-pip.py

Yet still after that i can't use pip from the terminal.

I did a search for pip

/usr/local/Cellar/python/2.7.11/libexec/pip
/usr/local/Cellar/python/2.7.11/libexec/pip/pip
/usr/local/lib/python2.7/site-packages/pip
/usr/local/lib/python3.4/site-packages/pip

which means that my installation worked fine. Last I also checked my $PATH and /usr/local/bin is there but as you can see pip is not there and I can't seem to find the pip executable.

which -a python

gives

/usr/local/bin/python
/usr/bin

The Homebrew installation and the default OSX Python. /usr/local/bin takes precedence though so it should be fine.

David Andrei Ned
  • 799
  • 1
  • 11
  • 28
pengwinsurf
  • 93
  • 1
  • 7
  • usually it places shortcuts to the actual install directory but it wouldn't if it got permission errors, I'd recommend trying `sudo` and seeing if that puts the executable or a shortcut to somewhere on your PATH. – Tadhg McDonald-Jensen Apr 22 '16 at 17:48
  • @TadhgMcDonald-Jensen. *The standard script installs Homebrew to /usr/local so that you don’t need sudo when you brew install.* – 7stud Apr 22 '16 at 18:00
  • @7stud, sorry I meant "Usually `get-pip` will place shortcuts... " I can't speak for the behaviour of brew. – Tadhg McDonald-Jensen Apr 22 '16 at 18:03
  • Can you post the output of `which pip` (i.e. no -a flag)? – 7stud Apr 22 '16 at 18:05
  • Also, you may have accomplished this: *Be cautious if you're using a Python install that's managed by your operating system **or another package manager**. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state.* – 7stud Apr 22 '16 at 18:16

0 Answers0