试了这个链接的方法:https://blog.csdn.net/q1234luo/article/details/88954985,不行,然后又试了试这个方法:https://blog.csdn.net/xuxile/article/details/86563087,终于可以了。 详细步骤如下:
(1):在windows文件管理器中,输入 %APPDATA%
(2):会定位到一个新的目录下,在该目录下新建pip文件夹,然后到pip文件夹里面去新建个pip.ini文件
(3):在新建的pip.ini文件中输入以下内容
[global]
timeout = 6000
index-url = http://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com
保存关闭,就可以了,我的是python3.7
附国内主要镜像源: 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣 http://pypi.douban.com/simple Python官方 https://pypi.python.org/simple/ v2ex http://pypi.v2ex.com/simple/ 中国科学院 http://pypi.mirrors.opencas.cn/simple/ 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
–