pip国内源


豆瓣(douban) http://pypi.douban.com/simple/ 




中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

指定所用的源安装

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

指定版本安装

pip install -i http://pypi.douban.com/simple/ YOUR_PACKAGE===version


设置pip源

mkdir /root/.pip

touch /root/.pip/pip.conf

把下面的内容写进去:

  1 [global]
  2 timeout =6000
  3 index-url= https://pypi.douban.com/simple/
  4 extra-index-url= http://mirrors.aliyun.com/pypi/simple/
  5 
  6 [install]
  7 trusted-host=
  8     pypi.douban.com
  9     mirrors.aliyun.com


原文地址:https://www.cnblogs.com/double12gzh/p/10166112.html