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

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

  

  3.2  

  

  3.3

  

  3.4

  

  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.大功告成

posted @ 2019-10-21 23:43  yblackd  阅读(22160)  评论(0编辑  收藏  举报