个人技术分享

BUG:ERROR: Could not find a version that satisfies the requirement cffi

环境

Linux
Python 3.10

详情

在安装 cld2-cffi 库时发生的错误。

ERROR: Could not find a version that satisfies the requirement cffi (from versions: none)
`ERROR: No matching distribution found for cffi`
distutils.errors.DistutilsError: Command '['/home/zmp/.conda/envs/keytechcpu/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpwqwgl4az', '--quiet', 'cffi']' returned non-zero exit status 1.

错误原因:这个错误由于安装 cffi 失败导致的错误。

尝试使用 pip install cffi 安装 cffi 也失败了。

解决方法

更新setuptools 和安装incremental

pip install --upgrade setuptools
pip install incremental

然后再安装 cld2-cffi

pip install cld2-cffi==0.1.4

参考

python报错distutils.errors.DistutilsError(记一次项目部署问题)_distutils.errors.distutilserror: command ‘’/usr/b-CSDN博客