阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

永久修改镜像源

pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
运行成功后:
pip永久更换镜像源
这里实际上是在C:\Users\Administrator\AppData\Roaming\pip下生成了一个pip.ini文件,并在里面进行配置;

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

查看修改后的配置

pip config list
运行后结果:
pip永久更换镜像源

临时使用镜像源

如果不想永久的修改镜像源,可以使用一下命令
pip --default-timeout=1000 install --index-url https://mirrors.aliyun.com/pypi/simple 包名

https://developer.aliyun.com/article/652884
https://blog.csdn.net/Chennybaba/article/details/108083944

相关文章:

  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
相关资源
相似解决方案