pip 换源

发布时间 2023-10-17 17:54:46作者: etfolin

8个国内镜像源

以下是中国常见的pip镜像源,按照完全度和下载速度排序,需要注意的是,镜像源的完全度和速度可能因地域和时间而异,建议根据自己的实际情况选择合适的镜像源。

# 1. 大学(完全度和速度都很好,是一个优秀的pip镜像源)
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# 2. 阿里云(完全度和速度也很好,是一个不错的选择)
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

# 3. 网易(速度比较快,但是完全度有限)
pip config set global.index-url https://mirrors.163.com/pypi/simple/ 

# 4. 豆瓣(速度较快,但是完全度也有限)
pip config set global.index-url https://pypi.douban.com/simple/ 

# 5. 百度云(速度较快,但是完全度也有限)
pip config set global.index-url https://mirror.baidu.com/pypi/simple/

# 6. 中科大(速度较快,但完全度不如前面几个镜像源)
pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/

# 7. 华为云(完全度和速度均中等)
pip config set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple/

# 8. 腾讯云(速度一般,完全度也一般)
pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple/