人们似乎最常推荐的是这个:
$ sudo apt-get install python-setuptools
$ sudo easy_install pip
$ sudo pip install virtualenv
或者这个,我从http://www.pip-installer.org/en/latest/installing.html:
$ curl -O https://github.com/pypa/virtualenv/raw/master/virtualenv.py
$ python virtualenv.py my_new_env
$ . my_new_env/bin/activate
(my_new_env)$ pip install ...
或者完全不同的东西?
如果您可以安装最新的 Python(2.7.9 及更高版本),Pip 现在已与其捆绑在一起。
看:https://docs.python.org/2.7//installing/index.html
如果不 :
更新(来自发行说明):
从 v1.5.1 开始,pip 在运行 get-pip.py 之前不需要 setuptools。此外,如果尚未安装 setuptools(或分发),get-pip.py 将为您安装 setuptools。
我现在运行常规:
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python
以下是官方的安装说明:http://pip.readthedocs.org/en/latest/installing.html#install-pip
2013 年 7 月 25 日编辑:
更改了 setuptools 安装的 URL。
2014 年 2 月 10 日编辑:
删除了 setuptools 安装(感谢@Ciantic)
2014 年 6 月 26 日编辑:
再次更新了网址(感谢@LarsH)
2015 年 3 月 1 日编辑:
Pip 现在与 Python 捆绑在一起
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)