pythonpython-3.xpiprhel

python cryptography can't installed on RHEL 8.6 when python version is 3.9


we have tried to install the cryptography module on our RHEL 8.6 linux machine but without success

here short details about our server

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

and examples from installation proccess

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.

and with diff version

pip3 install --no-cache-dir --no-index "/tmp/cryptography-37.0.2-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl"
ERROR: cryptography-37.0.2-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl is not a supported wheel on this platform.

or different version

 pip3 install --no-cache-dir --no-index "/tmp/cryptography-37.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
ERROR: cryptography-37.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl is not a supported wheel on this platform.

or

pip3 install --no-cache-dir --no-index "/tmp/cryptography-37.0.3-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl"
ERROR: cryptography-37.0.3-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl is not a supported wheel on this platform.

or

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.

I also downgrade the setuptools to version 38.4.0 but the same error and we reinstall the setuptools to original version - 68.2.2

so we not understand if cryptography cant installed on RHEL 8.6 version with python 3.9


Solution

  • Red Hat provides a pre-built version of Python cryptography module in the python3-cryptography RPM package. It is compatible with the system Python version 3.9. You can install it using:

    yum install python3-cryptography
    

    I believe it was already included in Red Hat Enterprise Linux 8.6.