1:pip官方下载地址
https://pypi.python.org/pypi/pip#downloads
2:下载安装pip
1
2
3
4
5
|
wget -c --no-check-certificate https: //pypi .python.org /packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9 .0.1. tar .gz #md5=35f01da33009719497f01a4ba69d63c9
tar -zxvf pip-9.0.1. tar .gz -C /usr/local/src/
cd /usr/local/src/pip-9 .0.1
python setup.py install
echo $?
|
3: pip使用详解
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
pip install redis
# pip安装redis pip uninstall redis # pip卸载redis pip list --outdated # pip检查哪些包需要更新 pip install --upgrade SomePackage
# pip升级包 # pip --help # pip参数详解 Usage: pip < command > [options]
Commands: install 安装包.
uninstall 卸载包.
freeze 按着一定格式输出已安装包列表
list 列出已安装包.
show 显示包详细信息.
search 搜索包,类似yum里的search.
wheel Build wheels from your requirements.
zip 不推荐. Zip individual packages.
unzip 不推荐. Unzip individual packages.
bundle 不推荐. Create pybundles.
help 当前帮助
|
4: 错误提示
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
[root@localhost pip-9.0.1] # python setup.py install
Traceback (most recent call last): File "setup.py" , line 6, in <module>
from setuptools import setup, find_packages
ImportError: No module named setuptools 下载安装setuptools wget -c https: //pypi .python.org /packages/55/61/fdecfda95355db1c67daa6c8e6ee747f8a0bbc0a5e18f8bfd716bdffac3e/setuptools-35 .0.1.zip #md5=88b03a5f88772f96a60236368a91d86e
unzip setuptools-35.0.1.zip cd setuptools-35.0.1
[root@localhost setuptools-35.0.1] # python setup.py install
Traceback (most recent call last): File "setup.py" , line 11, in <module>
import setuptools
File "/usr/local/src/setuptools-35.0.1/setuptools/__init__.py" , line 10, in <module>
from six.moves import filter, map
ImportError: No module named six.moves [root@localhost setuptools-35.0.1] # wget -P /usr/local/src/
[root@localhost src] # tar -zxvf six-1.10.0.tar.gz
[root@localhost six-1.10.0] # python setup.py install
wget -P /usr/local/src/ [root@localhost six-1.10.0] # python setup.py install
wget -P /usr/local/src/ https: //pypi .python.org /packages/48/69/d87c60746b393309ca30761f8e2b49473d43450b150cb08f3c6df5c11be5/appdirs-1 .4.3. tar .gz #md5=44c679904082a2133f5566c8a0d3ab42
|
以上都是setuptools依赖包
本文转自 运维小学生 51CTO博客,原文链接:http://blog.51cto.com/yasar/1917456,如需转载请自行联系原作者