python更换国内镜像源

1.永久修改镜像源

python的命令提示符中运行以下语句,该条语句将pip的下载源永久更改为某个镜像站,这里以清华大学开源镜像站为例:

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/

2.临时修改镜像源

在安装库的时候,临时需要用到某个镜像,这里以清华大学镜像为例下载pandas库

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

3.pip下载源常用的国内镜像

豆瓣:http://pypi.douban.com/simple/
阿里云:http://mirrors.aliyun.com/pypi/simple/
华为云:https://repo.huaweicloud.com/repository/pypi/simple
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
中科大:https://pypi.mirrors.ustc.edu.cn/simple/

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2023年8月28日
下一篇 2023年8月28日

相关推荐