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/

感谢大家的关注与支持~

相关推荐
用户83562907805121 分钟前
使用 Python 自动创建 Excel 折线图
后端·python
小白学大数据1 小时前
面向大规模爬取:Python 全站链接爬虫优化(过滤 + 断点续爬)
开发语言·爬虫·python
WL_Aurora1 小时前
【每日一题】贪心
python·算法
Geoking.1 小时前
VSCode 安装 Claude Code 插件 + ccswitch 配置 DeepSeek API 完整教程(Windows 新手向)
ide·windows·vscode
IT策士2 小时前
Python 中间件系列:redis 深入浅出
redis·python·中间件
Dxy12393102162 小时前
Python Pillow库:`img.format`与`img.mode`的区别详解
开发语言·python·pillow
༒࿈南林࿈༒2 小时前
刺猬猫小说下载
python·js逆向
.柒宇.3 小时前
AI-Agent入门实战-AI私厨
人工智能·python·langchain·agent·fastapi
默子昂3 小时前
langchain 基本使用
开发语言·python·langchain
SilentSamsara3 小时前
生成器实战:处理大文件、流水线模式与无限序列
vscode·python·青少年编程·pycharm