1.为什么这么做?

  Python里的pip是官方自带的源,国内使用pip安装的时候十分缓慢,所以最好是更换成中国国内的源地址。

2.准备工作:

1 目前国内靠谱的 pip 镜像源有:
2 
3 清华: https://pypi.tuna.tsinghua.edu.cn/simple
4 
5 豆瓣: http://pypi.douban.com/simple/
6 
7 阿里: http://mirrors.aliyun.com/pypi/simple/    

3.怎么做?

  3.1

  Pycharm软件更换pip默认安装源为国内安装源

  3.2  

  Pycharm软件更换pip默认安装源为国内安装源

  3.3

  Pycharm软件更换pip默认安装源为国内安装源

  3.4

  Pycharm软件更换pip默认安装源为国内安装源

  3.5 

如果以上方法还是不可以的话

Windows下找到Python根目录下的pip文件夹,在文件夹内

新建一个文件pip.ini:

 
[global]  

timeout = 6000  

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

trusted-host = https://pypi.tuna.tsinghua.edu.cn 

 

4.大功告成

相关文章:

  • 2021-06-11
  • 2021-09-12
  • 2021-11-21
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-26
  • 2021-08-24
  • 2022-12-23
  • 2021-06-01
  • 2021-05-17
  • 2021-12-21
相关资源
相似解决方案