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/

感谢大家的关注与支持~

相关推荐
helloweilei16 小时前
python 抽象基类
python
用户83562907805116 小时前
Python 实现 PPT 转 HTML
后端·python
zone77391 天前
004:RAG 入门-LangChain读取PDF
后端·python·面试
zone77391 天前
005:RAG 入门-LangChain读取表格数据
后端·python·agent
树獭非懒1 天前
AI大模型小白手册|Embedding 与向量数据库
后端·python·llm
唐叔在学习2 天前
就算没有服务器,我照样能够同步数据
后端·python·程序员
曲幽2 天前
FastAPI流式输出实战与避坑指南:让AI像人一样“边想边说”
python·ai·fastapi·web·stream·chat·async·generator·ollama
Flittly2 天前
【从零手写 AI Agent:learn-claude-code 项目实战笔记】(1)The Agent Loop (智能体循环)
python·agent
vivo互联网技术2 天前
ICLR2026 | 视频虚化新突破!Any-to-Bokeh 一键生成电影感连贯效果
人工智能·python·深度学习