Skip to content

Cryptography 36.0.1 Build Failure on Ubuntu 22.04 (ARMv7l) #324

@mikep11

Description

@mikep11

Installing cryptography==36.0.1 on Ubuntu 22.04 (ARMv7l) fails during the wheel build. Since there are no pre-compiled binaries for this architecture/version, it tries to build from source and hits a compatibility wall between the OpenSSL 3.0 headers and the current setuptools version (v82+). Specifically, the build script crashes looking for pkg_resources.version.

To fix, I had to downgrade the build tools and force the install to use those versions instead of pip's default isolated environment.

  1. Install system headers and ensure Rust is in PATH:
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev libffi-dev python3-dev
export PATH="$HOME/.cargo/bin:$PATH"
  1. Downgrade to compatible build tool versions:
pip3 install "setuptools<60.0.0" "setuptools-rust==1.3.0"
  1. Install cryptography using the local environment (bypass build isolation):
pip3 install cryptography==36.0.1 --no-build-isolation

Verification:

python3 -c "import cryptography; print(cryptography.__version__)"

returned 36.0.1.

Restarted ./install.sh and the installation completed successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions