python模块安装问题:no matching distribution found for XXX 或者 Read timed out.

解决Python模块安装超时
本文分享了在安装codecs、theano等Python模块时遇到的超时问题解决方案。通过更换国内安装源和设置pip的超时时间为100秒,有效解决了因网络不稳定导致的模块安装失败问题。

在安装codecs,theano等模块时,经常出现这个问题。
在这里插入图片描述
看了很多解决问题的博客,亲测通过更换国内安装源设置超时时间可以解决。
pip install XXX命令的后面加上
--default-timeout=100 -i https://pypi.tuna.tsinghua.edu.cn/simple即可。
有时候只需更换国内安装源便可解决问题。
在这里插入图片描述
更换国内安装源参考这篇博客
设置超时时间参考这篇博客

(yolov8) C:\Users\Administrator>pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 --index-url https://download.pytorch.org/whl/cu124 Looking in indexes: https://download.pytorch.org/whl/cu124 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out. (read timeout=15)")': /whl/cu124/torch/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out. (read timeout=15)")': /whl/cu124/torch/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out. (read timeout=15)")': /whl/cu124/torch/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out. (read timeout=15)")': /whl/cu124/torch/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out. (read timeout=15)")': /whl/cu124/torch/ ERROR: Could not find a version that satisfies the requirement torch==2.4.1 (from versions: none) ERROR: No matching distribution found for torch==2.4.1
08-17
评论 45
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值