【pip】pip 换源

1. 国内镜像源

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

  1. 清华大学(完全度和速度都很好,是一个优秀的pip镜像源)
    https://pypi.tuna.tsinghua.edu.cn/simple
  2. 阿里云(完全度和速度也很好,是一个不错的选择)
    https://mirrors.aliyun.com/pypi/simple/
  3. 网易(速度比较快,但是完全度有限)
    https://mirrors.163.com/pypi/simple/
  4. 豆瓣(速度较快,但是完全度也有限)
    https://pypi.douban.com/simple/
  5. 百度云(速度较快,但是完全度也有限)
    https://mirror.baidu.com/pypi/simple/
  6. 中科大(速度较快,但完全度不如前面几个镜像源)
    https://pypi.mirrors.ustc.edu.cn/simple/
  7. 华为云(完全度和速度均中等)
    https://mirrors.huaweicloud.com/repository/pypi/simple/
  8. 腾讯云(速度一般,完全度也一般)
    https://mirrors.cloud.tencent.com/pypi/simple/

2. 使用方式

2.1 单次添加镜像的方法
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
2.2 永久添加镜像的方法
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值