pip修改镜像源

pip修改镜像源 pip临时使用pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/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如果您到 pip 默认源的网络连接较差临时使用本镜像站来升级 pippython -m pip install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple --upgrade pip配置多个镜像源如果您想配置多个镜像源平衡负载可在已经替换index-url的情况下通过以下方式继续增加源站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