[英]Python - Is there any way to get pip without setuptools?
Seems kinda weird that they'd require a package manager to install a package manager. 他们需要一个包管理器来安装包管理器,这似乎有点奇怪。 I'm on Windows BTW.
我在Windows BTW上。
Pip does require setuptools. Pip确实需要setuptools。 Pip is really just a wrapper around setuptools to provide a better installer than easy_install and some nicer installation behaviors, plus uninstall, requirements files, etc. Even if you somehow got pip installed without setuptools it still won't run without it.
Pip实际上只是setuptools的一个包装器,提供比easy_install更好的安装程序和一些更好的安装行为,以及卸载,需求文件等。即使你以某种方式安装了没有setuptools的pip,它仍然无法在没有它的情况下运行。
You can use Distribute
instead of setuptools
: it installs a package called setuptools
(it's a fork of the latter). 您可以使用
Distribute
而不是setuptools
:它安装一个名为setuptools
的包(它是后者的一个分支)。 You can install Distribute by downloading and running distribute_setup.py
. 您可以通过下载并运行
distribute_setup.py
来安装Distribute。
Update: As Gringo Suave says, the above is obsolete now - distribute
and setuptools
have now merged, and the merged project is called setuptools
. 更新:正如Gringo Suave所说,现在上面已经过时了 - 现在已经合并了
distribute
和setuptools
,合并后的项目叫做setuptools
。
您可以从pypi / setuptools下载setuptools
包作为Windows安装程序,然后安装pip
或easy_install
If you installed ActivePython on Windows, then you have pip by default, as well as PyPM (ActiveState's package manager). 如果你在Windows上安装了ActivePython ,那么你默认使用pip,以及PyPM(ActiveState的包管理器)。 The following excerpt is from What's included in ActivePython 2.7 :
以下摘录来自ActivePython 2.7中包含的内容 :
Additional Packages
附加包
- PyPM : Python Package Manager to download and install binary packages.
PyPM :用于下载和安装二进制包的Python包管理器。 Also included: virtualenv, Distribute, pip, SQLAlchemy.
还包括:virtualenv,Distribute,pip,SQLAlchemy。
Not sure if setuptools
is required when installing pip using homebrew . 使用自制软件安装pip时,不确定是否需要
setuptools
。 You might try that. 你可以尝试一下。
To install homebrew: 安装自制软件:
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
Then to install pip: 然后安装pip:
brew install pip
Sure, just grab the source from http://pypi.python.org/pypi/pip/0.8.2#downloads 当然,只需从http://pypi.python.org/pypi/pip/0.8.2#downloads获取源代码
unpack it, cd into it, and run python setup.py install
解压缩,cd进去,然后运行
python setup.py install
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.