小工具知识网

当前位置: 首页 > 行业知识 > python pip安装库—下载源更换(清华源、阿里源、中科大源、豆瓣源)

行业知识

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

2026-11-06 13:51:26 来源:互联网转载

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

如阿里

pip config set global.index-url https://mirrors.aliyun.com/pypi/simplepip 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,能够正常弹出如下图

上一篇:怎么把网站推广出去?

下一篇:揭秘天气预报特效制作秘籍,轻松掌握要点,打造吸睛特效标题!