pypi
服务域名
如果您正在使用 TUNA 镜像站,可以使用 pypi.tuna.tsinghua.edu.cn 替换下面所有的 mirrors.tuna.tsinghua.edu.cn/pypi/web。
BFSU 镜像站没有为 PyPI 提供独立服务域名。
PyPI 镜像在每次同步成功后间隔 5 分钟同步一次。
pip
临时使用pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple some-package
pip install -i {{endpoint}}/web/simple some-package
注意,simple 不能少。
pip 要求使用 https ,因此需要 https 而不是 http
升级 pip 到最新的版本后进行配置:
python -m pip install --upgrade pip pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python -m pip install --upgrade pip pip config set global.index-url {{endpoint}}/web/simple
如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip:
python -m pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --upgrade pip
python -m pip install -i {{endpoint}}/web/simple --upgrade pip 配置多个镜像源
如果您想配置多个镜像源平衡负载,可在已经替换 index-url 的情况下通过以下方式继续增加源站:
pip config set global.extra-index-url "<url1> <url2>..."
pip config set global.extra-index-url "<url1> <url2>..."
请自行替换引号内的内容,源地址之间需要有空格
例如
pip config set global.extra-index-url "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
pip config set global.extra-index-url "{{endpoint}}/web/simple"
PDM
通过如下命令设置默认镜像:
pdm config pypi.url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
pdm config pypi.url {{endpoint}}/web/simple
Poetry
通过以下命令为单个项目设置首选镜像:
poetry source add --priority=primary mirrors https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
poetry source add --priority=primary mirrors {{endpoint}}/web/simple/
通过以下命令为单个项目设置补充镜像:
poetry source add --priority=supplemental mirrors https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
poetry source add --priority=supplemental mirrors {{endpoint}}/web/simple/
Poetry 尚未支持全局设置镜像。参考 issue 1632。
使用全局镜像的临时方案是将 Poetry 的安装器切换回 pip,如下所示。但该方式会在将来的版本中停止支持,参考 PR 7356。
poetry config experimental.new-installer false
poetry config experimental.new-installer false
Astral uv
在 ~/.config/uv/uv.toml 或者 /etc/uv/uv.toml 填写下面的内容:
[[index]] url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" default = true
[[index]] url = "{{endpoint}}/web/simple/" default = true
详情参考官方配置文件文档。
Homebrew
本节主要供 Homebrew 帮助使用。
export HOMEBREW_PIP_INDEX_URL="https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
export HOMEBREW_PIP_INDEX_URL="{{endpoint}}/web/simple"
相关知识
1小时搭建“汪汪宠物狗”公司的N种模态文档的RAG智能对话机器人
win10+GPU+tensorflow安装配置 过程 的吐血总结
GAN实战笔记——第六章渐进式增长生成对抗网络(PGGAN)
【C4
【课程设计/毕业设计】python宠物领养管理系统源码和开发文档
python常用命令(初学者:超详细)
肆十二/YOLOV5
网址: pypi https://www.mcbbbk.com/newsview1274143.html
上一篇: 清华大学开源软件镜像站 |
下一篇: OpenTUNA 镜像站上线 |
推荐分享

- 1养玉米蛇的危害 28694
- 2狗交配为什么会锁住?从狗狗生 7180
- 3我的狗老公李淑敏33——如何 6236
- 4豆柴犬为什么不建议养?可爱的 4637
- 5南京宠物粮食薄荷饼宠物食品包 4563
- 6中国境内禁养的十大鸟种,你知 4429
- 7湖南隆飞尔动物药业有限公司宠 4259
- 8自制狗狗辅食:棉花面纱犬的美 4257
- 9家养水獭多少钱一只正常 4212
- 10广州哪里卖宠物猫狗的选择性多 4122