问题
Seems kinda weird that they'd require a package manager to install a package manager. I'm on Windows BTW.
回答1:
Pip does require 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.
回答2:
You can use Distribute
instead of setuptools
: it installs a package called setuptools
(it's a fork of the latter). You can install Distribute by downloading and running distribute_setup.py.
Update: As Gringo Suave says, the above is obsolete now - distribute
and setuptools
have now merged, and the merged project is called setuptools
.
回答3:
You can download setuptools
package as Windows installer from pypi/setuptools and then install pip
or easy_install
回答4:
Solution for Windows Users
If you installed ActivePython on Windows, then you have pip by default, as well as PyPM (ActiveState's package manager). The following excerpt is from What's included in ActivePython 2.7:
Additional Packages
- PyPM: Python Package Manager to download and install binary packages. Also included: virtualenv, Distribute, pip, SQLAlchemy.
Solution for OS X Users
Not sure if setuptools
is required when installing pip using homebrew. You might try that.
To install homebrew:
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
Then to install pip:
brew install pip
回答5:
Sure, just grab the source from http://pypi.python.org/pypi/pip/0.8.2#downloads
unpack it, cd into it, and run python setup.py install
来源:https://stackoverflow.com/questions/5097795/python-is-there-any-way-to-get-pip-without-setuptools