pip安装出现ReadTimeoutError主要是因为被墙,下载速度太慢了,解决方法:选择国内镜像下载
我在有些博客上看到解决办法是在C:\Users\Administrator\下新建pip文件夹,再创建pip.ini文件,拷贝下列代码:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
然后在cmd下执行
pip --default-timeout=100 install -U pip
但是我发现我电脑里没有Administrator...于是自己新建了一个,并按照上面方法执行了一次发现好像并没有任何改变
(经网友提醒是Users下本机用户名各位可以尝试一下这个方法)
于是尝试第二种方法:
以lxml为例在cmd中输入
pip install lxml -i https://pypi.tuna.tsinghua.edu.cn/simple
下载成功!而且速度很快
参考博文:https://blog.csdn.net/Candy_GL/article/details/80419820