RHEL 8.6 + Python 3.9环境下无法安装cryptography模块求助
在RHEL 8.6 + Python 3.9环境下安装cryptography模块失败
服务器环境信息
pip3 --version pip 23.2.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) python3 --version Python 3.9.16 pip3 list | grep setuptools setuptools 68.2.2 more /etc/redhat-release Red Hat Enterprise Linux release 8.6 (Ootpa) uname -a 4.18.0-372.9.1.el8.x86_64 #1 SMP Fri Apr 15 22:12:19 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
安装过程中的错误情况
1. Wheel包安装失败
尝试安装多个版本的wheel包均提示不支持当前平台,示例如下:
pip3 install --no-cache-dir --no-index "/tmp/1/cryptography-41.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl" ERROR: cryptography-41.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl is not a supported wheel on this platform.
2. 源码包安装失败
尝试安装源码包时出现构建依赖安装错误:
pip3 install --no-cache-dir --no-index "/tmp/cryptography-41.0.4.tar.gz" Processing /tmp/cryptography-41.0.4.tar.gz Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [2 lines of output] ERROR: Could not find a version that satisfies the requirement setuptools>=61.0.0 (from versions: none) ERROR: No matching distribution found for setuptools>=61.0.0 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip.
已尝试的操作
- 将setuptools降级至38.4.0,仍出现相同错误,之后恢复至原版本68.2.2。
疑问
不清楚cryptography是否无法在RHEL 8.6 + Python 3.9环境下安装。
内容的提问来源于stack exchange,提问作者Judy
相关产品推荐
相关产品推荐

