使用pip安装web3时报错:无法找到满足要求的ipfshttpclient==0.7.0版本
pip安装web3提示ipfshttpclient==0.7.0不存在的解决方案
你遇到的报错原文如下:
ERROR: Could not find a version that satisfies the requirement ipfshttpclient0.7.0 (from web3) (from versions: 0.4.10, 0.4.11, 0.4.12, 0.4.13, 0.4.13.1, 0.4.13.2, 0.6.0, 0.6.0.post1, 0.6.1)
ERROR: No matching distribution found for ipfshttpclient0.7.0 (from web3)
该报错的核心原因是最新版web3依赖的ipfshttpclient 0.7.0版本已从PyPI官方源下架,现有可公开获取的版本最高为0.6.1,且你使用的Python 3.7.2本身也不兼容要求ipfshttpclient 0.7.0的高版本web3。可按以下方案解决:
- 方案一(最推荐,适配Python3.7环境):安装兼容Python3.7、依赖ipfshttpclient 0.6.x版本的web3稳定版
安装前先清理残留避免缓存干扰:pip uninstall -y web3 ipfshttpclient
执行安装命令:pip install web3==5.31.4 - 方案二(必须使用高版本web3时选用):先手动安装现有最高版ipfshttpclient,再跳过依赖检查安装web3
- 安装ipfshttpclient 0.6.1:
pip install ipfshttpclient==0.6.1 - 跳过依赖检查安装web3:
pip install web3 --no-deps
注意:该方案可能存在依赖缺失风险,后续运行web3相关功能时如果提示缺少其他依赖,需手动补装对应包。
- 安装ipfshttpclient 0.6.1:
内容的提问来源于stack exchange,提问作者Sanguis
相关产品推荐
相关产品推荐

