批处理--设置python永久镜像源

批处理文件

以下内容保存为pypi.bat

pip config set global.index-url  http://mirrors.aliyun.com/pypi/simple 
pip config set global.trusted-host mirrors.aliyun.com
pip config set global.disable-pip-version-check true
pip config set global.timeout 30

其他的镜像源

豆瓣 https://pypi.doubanio.com/simple/
网易 https://mirrors.163.com/pypi/simple/
阿里云 https://mirrors.aliyun.com/pypi/simple/
腾讯云 https://mirrors.cloud.tencent.com/pypi/simple
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

注意

以上镜像源对于包的更新频率不如官方的, 如果要下载最新版的包,建议使用官方

posted @ 2022-02-23 14:41  Jruing  阅读(90)  评论(0编辑  收藏  举报