步骤

➜  ~ mkdir .pip
➜  ~ cd .pip
➜  .pip touch pip.conf
➜  .pip vi pip.conf

其中pip.conf的内容为:

[global]

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

[install]

trusted-host=mirrors.aliyun.com

上面是阿里云的源,还可以改为豆瓣的源:

[global]

index-url = http://pypi.douban.com/simple

[install]

trusted-host=pypi.douban.com

若单次使用指定源,则可以如下:

sudo pip install -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com/simple ipython

参考

相关文章:

  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
猜你喜欢
  • 2021-12-31
  • 2021-09-03
  • 2021-07-27
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案