1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
##安装pip并更改国内的源
[root@slb02 ~]
# yum -y install python-setuptools
Loaded plugins: fastestmirror
。。。
。。。
Installed:
python-setuptools.noarch 0:0.6.10-3.el6
Complete!
[root@slb02 ~]
#
[root@slb02 ~]
# easy_install pip
Searching
for
pip
Reading http:
//pypi
.python.org
/simple/pip/
Best match: pip 9.0.1
Downloading https:
//pypi
.python.org
/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9
.0.1.
tar
.gz
#md5=35f01da33009719497f01a4ba69d63c9
^Cinterrupted
##请求半天无反应,切换为国内的源,提高速度
[root@slb02 ~]
# cd ~ ##到家目录
[root@slb02 ~]
# vim .pydistutils.cfg
[easy_install]
index-url=http:
//pypi
.douban.com
/simple
find
-links=
http:
//pypi
.douban.com
/simple
|
1
2
3
4
5
6
7
8
9
10
|
##修改pip的源为国内的
[root@slb02 ~]
# mkdir .pip
[root@slb02 ~]
# vim .pip/pip.conf
[global]
timeout =6000
index-url =http:
//pypi
.douban.com
/simple/
[
install
]
use-mirrors =
true
mirrors =http:
//pypi
.douban.com
/simple/
trusted-host =pypi.douban.com
|
本文转自偏执与柔情51CTO博客,原文链接:http://blog.51cto.com/lesliecheung/1976484 ,如需转载请自行联系原作者