python安装第三方库失败?

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fdcbaaeb7d0>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/jupyter/

这从报错中看出大致是因为pip源连接验证失败,解决办法是将pip源换成国内源,例如想安装jupyter,命令为:

pip install jupyter -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

记得复制粘贴时,将示例中的 jupyter 更换为你需要install的名字呐.

在示例中,我使用了豆瓣(douban)源,除了豆瓣之外,还有几个国内源可以备选:

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

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
posted @   dcwange11  阅读(245)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· .NET Core 中如何实现缓存的预热?
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
点击右上角即可分享
微信分享提示