更换到国内源

 

yum

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache

pip

copied from: https://www.jianshu.com/p/a13649dbe014

国内pypi镜像

V2EX:http://pypi.v2ex.com/simple
豆瓣:http://pypi.douban.com/simple
中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/simple/
清华:https://pypi.tuna.tsinghua.edu.cn/simple

指定单次安装源

pip install pandas -i http://pypi.douban.com/simple

指定全局安装源

在unix和macos,配置文件为:$HOME/.pip/pip.conf
[global]
index-url = http://pypi.douban.com/simple

 
posted @ 2018-05-16 14:25  wangheng1409  阅读(53)  评论(0)    收藏  举报