今天在pycharm里面pip install 库 的时候报了这个错,如图所示:
image
第一种,设置超时时间,命令如下:
pip --default-timeout=1000 install -U 模块名
第二种,用镜像网站进行下载,这种方法下载的速度超快的哦=.=,命令如下:
pip --default-timeout=100 install 库名称 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
除此之外,还可以利用以下镜像网站来进行下载

点击查看代码
1、https://pypi.tuna.tsinghua.edu.cn/simple/
2、https://pypi.mirrors.ustc.edu.cn/simple/ 
3、http://pypi.sdutlinux.org/
4、http://mirrors.aliyun.com/pypi/simple/
5、http://pypi.hustunique.com/

下载方法同上将镜像网站的地址进行替换即可
posted on   大白的小土豆  阅读(349)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通



点击右上角即可分享
微信分享提示