找回密码
 立即注册
搜索
查看: 51|回复: 0

pip国内源

[复制链接]

52

主题

0

回帖

228

积分

管理员

积分
228
发表于 2025-8-6 17:10:24 | 显示全部楼层 |阅读模式
一、主流国内源对比分析
1. 阿里云镜像
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
更新频率:每10分钟同步
特色服务:提供专属企业版镜像
推荐场景:企业级开发、CI/CD流水线

2. 清华大学TUNA
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
学术友好:与高校科研环境深度整合
附加服务:提供Anaconda镜像
数据统计:服务超过200万开发者

3. 华为云镜像
pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple/
安全认证:通过ISO 27001认证
区域覆盖:支持全球15个区域节点
特别优势:ARM架构适配最佳

二、配置方法与实用技巧
1. 永久配置方案
修改pip配置文件(位置:~/.config/pip/pip.conf):
[global] index-url = https://mirrors.aliyun.com/pypi/simple/ trusted-host = mirrors.aliyun.com timeout = 120
2. 临时使用方式
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn

三、常见问题排错指南
问题现象:SSL证书错误
解决方案:添加--trusted-host参数
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

SKYPIEA

GMT+8, 2025-9-7 13:47 , Processed in 0.052210 second(s), 19 queries .

快速回复 返回顶部 返回列表