From cd5e86d822ad5986dd006f7da4aa3c79108e29ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=85=E9=9D=88=E8=AA=9E?= Date: Tue, 8 Nov 2022 16:34:02 +0800 Subject: [PATCH] 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. --- help/_posts/1970-01-01-pypi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/help/_posts/1970-01-01-pypi.md b/help/_posts/1970-01-01-pypi.md index 7e184e9..48c75ce 100644 --- a/help/_posts/1970-01-01-pypi.md +++ b/help/_posts/1970-01-01-pypi.md @@ -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 ```