我使用Homebrew安装了Python。这意味着我应该通过以下方式安装PIP:
brew python install
我想在Python Homebrew安装中使用PIP的原因是因为我不想让必须维护多个库存储库的头痛。我希望我使用PIP安装的所有Python库都在/usr/local/Cellar/python2.7.11 /
做一个
brew list python
我得到以下输出
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)
我似乎无法在/usr/local/Cellar/python/2.7.11/bin中看到pip
当然我也尝试使用
自行安装pippython get-pip.py
然而在此之后我仍然无法使用终端的点子。
我搜索了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
这意味着我的安装工作正常。最后我还检查了我的$ PATH和/ usr / local / bin是否存在,但是你可以看到pip不在那里,我似乎无法找到pip可执行文件。
which -a python
给出
/usr/local/bin/python
/usr/bin
Homebrew安装和默认的OSX Python。 / usr / local / bin优先,但应该没问题。