【问题标题】:Homebrew python formula pip installation自制python公式pip安装
【发布时间】:2016-02-14 06:27:20
【问题描述】:

Homebrew python 公式说它安装了 pip 和 setuptools,但 pip 不在我的路径中,并且以下查找不返回任何结果:

sudo find / -name pip -type f

如何让 pip 和 setuptools 在我的机器上工作?它运行的是 OS X 10.11.1。

更新 brew info python 的输出是:

python: stable 2.7.10 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org
/usr/local/Cellar/python/2.7.10_2 (5902 files, 92M) *
  Built from source
From:     https://github.com/Homebrew/homebrew/blob/master/Library/Formula/python.rb
==> Dependencies
Build: pkg-config ✔
Required: openssl ✔
Recommended: readline ✔, sqlite ✔, gdbm ✔
Optional: homebrew/dupes/tcl-tk ✘, berkeley-db4 ✘
==> Options
--universal
    Build a universal binary
--with-berkeley-db4
    Build with berkeley-db4 support
--with-poll
    Enable select.poll, which is not fully implemented on OS X (https://bugs.python.org/issue5154)
--with-quicktest
    Run `make quicktest` after the build (for devs; may fail)
--with-tcl-tk
    Use Homebrew's Tk instead of OS X Tk (has optional Cocoa and threads support)
--without-gdbm
    Build without gdbm support
--without-readline
    Build without readline support
--without-sqlite
    Build without sqlite support
--HEAD
    Install HEAD version
==> Caveats
Pip and setuptools have been installed. To update them
  pip install --upgrade pip setuptools

You can install Python packages with
  pip install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See:     https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md

.app bundles were installed.
Run `brew linkapps python` to symlink these to /Applications.

我按照上面的说明运行了brew linkapps python

【问题讨论】:

  • brew info python 的输出是什么?
  • @bfontaine 我在上面的编辑中添加了输出。

标签: python python-2.7 pip homebrew setuptools


【解决方案1】:

Python 2.7.9 及更高版本(在 python2 系列上),Python 3.4 及更高版本默认包含 pip,因此您可能已经有 pip。

SetupTools -- 轻松下载、构建、安装、升级和卸载 Python 包

请看,https://pypi.python.org/pypi/setuptools

【讨论】:

  • 我担心在自制软件之外安装 pip 和 SetupTools,如果自制软件说它已经安装了它们。当自制软件说应该安装时,为什么不安装 pip 的任何原因?
猜你喜欢
  • 2021-02-03
  • 1970-01-01
  • 1970-01-01
  • 2022-06-22
  • 2014-02-18
  • 1970-01-01
  • 2019-02-27
  • 2019-12-21
  • 1970-01-01
相关资源
最近更新 更多