初学python,Pycharm安装第三方库时出现Read timed out:
原因
网上找了一下,大概是通过国外镜像源下载太慢,导致超时,博主们都是通过在命令行改变超时的时间来解决问题:
pip --default-timeout=100 install -U xxx
而如果你用的IDE是Pycharm的话可以更换下载源来解决问题
其他解决方法
在下载库的界面点击Manage Repositories
通过切换下载源就可以解决问题啦
常用pip的镜像路径有:
1.阿里云
pip install 包名 -i http://mirrors.aliyun.com/pypi/simple/
2.中国科技大学
pip install 包名 -i https://pypi.mirrors.ustc.edu.cn/simple/
3.豆瓣
pip install 包名 -i http://pypi.douban.com/simple/
4.清华大学
pip install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple/
5.中国科学技术大学
pip install 包名 -i http://pypi.mirrors.ustc.edu.cn/simple/
6.加利福利亚大学
pip install 包名 -i https://www.lfd.uci.edu/~gohlke/pythonlibs/
参考自:https://blog.csdn.net/tandelin/article/details/103468699