python国内源

1.常用的载安装包的国内源地址

pypi 清华大学源:https://pypi.tuna.tsinghua.edu.cn/simple
pypi 豆瓣源 :http://pypi.douban.com/simple/
pypi 腾讯源:http://mirrors.cloud.tencent.com/pypi/simple
pypi 阿里源:https://mirrors.aliyun.com/pypi

使用如下:

pip install xxx -i 源地址

2.临时使用的国内源

pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -i http://mirrors.gwm.cn/pypi/web/simple  --trusted-host mirrors.gwm.cn flask

3.全局使用的国内源

pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
pip config set global.trusted-host mirrors.cloud.tencent.com

命令运行完成后,pip.conf中内容为:

[global]
index-url = http://mirrors.tencentyun.com/pypi/simple
trusted-host = mirrors.tencentyun.com

你可能感兴趣的:(pyhton,python,开发语言,ubuntu)