PyPI 镜像在每次同步成功后间隔 5 分钟同步一次。
对于 PyPI 提供的 simple 接口,大部分镜像站在 /web/simple
提供;PKU 在 /simple
提供,请注意选择。
pip
临时使用
simple 链接
注意,simple
不能少。
pip 要求使用 https
,因此需要 https
而不是 http
设为默认
升级 pip 到最新的版本 (>=10.0.0) 后进行配置:
simple 链接
如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip:
simple 链接
配置多个镜像源
如果您想配置多个镜像源平衡负载,可在已经替换 index-url
的情况下通过以下方式继续增加源站:
请自行替换引号内的内容,源地址之间需要有空格
例如
simple 链接
PDM
通过如下命令设置默认镜像:
simple 链接
Poetry
通过以下命令设置默认镜像:
simple 链接
通过以下命令设置次级镜像:
simple 链接