python pip安装库—下载源更换(清华源、阿里源、中科大源、豆瓣源)

04-13 1167阅读

使用全局配置,建议使用豆瓣

如阿里

pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip config set install.trusted-host mirrors.aliyun.com

如豆瓣

pip config set global.index-url http://pypi.douban.com/simple/
pip config set install.trusted-host pypi.douban.com

一、清华源 https://pypi.tuna.tsinghua.edu.cn/simple/

pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple/

二、阿里源 https://mirrors.aliyun.com/pypi/simple

pip install xxx -i https://mirrors.aliyun.com/pypi/simple

三、中科大源 https://pypi.mirrors.ustc.edu.cn/simple/

pip install xxx -i https://pypi.mirrors.ustc.edu.cn/simple/

四、豆瓣源 http://pypi.douban.com/simple/

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

前提条件:

你的pip需要设置为环境变量里

如,按下 win+r,出入cmd,继续输入pip,能够正常弹出如下图

python pip安装库—下载源更换(清华源、阿里源、中科大源、豆瓣源)

python pip安装库—下载源更换(清华源、阿里源、中科大源、豆瓣源)

VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]