PyCharm 安装库时显示连接超时

在setting->python Interpreter 中用"+" 安装库时,出现一个弹窗,提示信息如下:

复制代码
Error updating package list: Connect timed out

通过查阅资料,发现是镜像源的问题,具体的解决方案如下:

1. 更新一下pip版本

pip install --upgrade pip

2. 用pip安装库时加上源的地址

pip install 包名 -i https://pypi.tuna.tsinghua.edu.cn/simple/

我这里时安装的pandas库,所以我终端里输入的是:

pip install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple/

运行结果如下:

此时pandas库已经安装成功了! !终于解决了!!!我还以为是http 代理的问题(我是设置了不使用代理),但其实并不是,我修改完之后没什么用。。

注:

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里:http://mirrors.aliyun.com/pypi/simple/

豆瓣:http://pypi.douban.com/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/

感谢大家的关注与支持~

相关推荐
智写-AI6 分钟前
推荐一下好用的降英文AI工具工具
人工智能·python
zzzll11119 分钟前
Typora插件开发指南:打造专属IDE式写作环境
ide·学习·计算机·大模型·llm·知识
snow@li20 分钟前
VSCode:学习手册 / 全景梳理与深度分析
ide·vscode
江华森1 小时前
Python神经网络编程(四):Python从零搭建神经网络
开发语言·python·神经网络
nothing&nowhere10 小时前
用 Python 做问卷数据清洗:无效样本检测与处理实战
开发语言·python·数据清洗·数据处理·问卷星·问卷星脚本·刷问卷
花酒锄作田11 小时前
如何发布自己的 Python 库到 PyPI
python
researcher-Jiang11 小时前
Design Patterns——Template Method入门到情景实战
python·设计模式·模板方法模式
飞猪~15 小时前
LangChain python 版本 第一集
开发语言·python·langchain
2601_9563198815 小时前
最新AI量化提效,先做可验证的小流程
人工智能·python