Files
2024-02-16 13:11:30 +08:00

24 lines
757 B
Plaintext

---
mirrorId: pypi
---
> pypi 镜像目前仅为校内用户提供镜像服务。若您的网络环境处于校外, pip 的 HTTP(S) 请求将会被重定向( 302 )至清华 TUNA 镜像站。
### 临时使用
```bash
pip install -i https://mirrors.jcut.edu.cn/pypi/web/simple some-package
```
注意,`simple` 不能少,若使用 http 镜像需要加上 `--trusted-host mirrors.jcut.edu.cn`
### 设为默认
升级 pip 到最新的版本 (>=10.0.0) 后进行配置:
```bash
pip install pip -U
pip config set global.index-url https://mirrors.jcut.edu.cn/pypi/web/simple
```
如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip :
```bash
pip install -i https://mirrors.jcut.edu.cn/pypi/web/simple pip -U
```