临时使用:

可以在使用pip的时候加参数-i  https://pypi.tuna.tsinghua.edu.cn/simple

例:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gevent

永久使用:

Linux下,修改 ~/.pip/pip.conf (没有就创建一个), 修改 index-url至tuna,内容如下:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

[install]
trusted-host = pypi.douban.com

windows下,直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,内容如下:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

[install]
trusted-host = pypi.douban.com

 

相关文章:

  • 2021-04-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-29
  • 2022-02-21
  • 2021-05-21
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案