当前位置: 代码网 > it编程>前端脚本>Python > python pip安装库下载源更换(清华源、阿里源、中科大源、豆瓣源)

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

2024年10月17日 Python 我要评论
使用全局配置,建议使用豆瓣如阿里pip config set global.index-url https://mirrors.aliyun.com/pypi/simplepip config set

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

如阿里

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下载源更换内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com