Configure the TUNA mirror as an extra index url

The `--extra-index-url` option allows the user to configure multiple index urls, thus balancing the load.
This commit is contained in:
清靈語 2022-11-08 16:34:02 +08:00 committed by GitHub
parent b4d2b189ad
commit cd5e86d822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,11 +22,11 @@ pip install -i https://{{ site.pypi }}/simple some-package
```
python -m pip install --upgrade pip
pip config set global.index-url https://{{ site.pypi }}/simple
pip config set global.extra-index-url https://{{ site.pypi }}/simple
```
如果您到 pip 默认源的网络连接较差,临时使用本镜像站来升级 pip
```
python -m pip install -i https://{{ site.pypi }}/simple --upgrade pip
python -m pip install --extra-index-url https://{{ site.pypi }}/simple --upgrade pip
```