pip 从国内的镜像源下载安装方法

阅读 60

2022-01-15

国内镜像地址备份

pip 安装第三方库速度太慢

可设置 pip 从国内的镜像源下载安装

阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

设置方法,以清华镜像源为例:

1. 临时使用

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

2. 永久设置

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

精彩评论(0)

0 0 举报