pip、easy_install切换国内源

简介:
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 ,如需转载请自行联系原作者



相关文章
|
Python
python-安装easy_install和pip(win64位)
学习python-安装easy_install和pip(win64位)。
192 0
python-安装easy_install和pip(win64位)
|
Linux C语言 Python
linux下安装easy_install、pip和psutil模块
1.上传软件setuptools-25.2.0.tar.gz    tar xvf setuptools-25.2.0.tar.gz    //解压软件 ls cd setuptools-25.2.0 //进入目录进入目录 python setup.
1517 0
|
Linux Python
linux python工具pip和 easy_install的安装
(1)  easy_install:yum install python-setuptools 使用 命令: 安装:easy_install pyspider 删除:easy_install -m  pyspider 升级:easy_install  --upgrade pyspider (2)  pip : yum install python-pip 使用命令:   安装
2018 0
|
4月前
|
Serverless Linux Windows
在函数计算中,如果pip安装速度较慢
在函数计算中,如果pip安装速度较慢
39 1