Termux Compilation error Cryptography

Package would be ignored

############################

Python recognizes ‘cryptography.hazmat.bindings._rust’ as an importable package,

but it is not listed in the packages configuration of setuptools.

‘cryptography.hazmat.bindings._rust’ has been automatically added to the distribution only

because it may contain data files, but this behavior is likely to change

in future versions of setuptools (and therefore is considered deprecated).

Please make sure that ‘cryptography.hazmat.bindings._rust’ is included as a package by using

the packages configuration field or the proper discovery methods

(for example by using find_namespace_packages(...)/find_namespace:

instead of find_packages(...)/find:).

You can read more about “package discovery” and “data files” on setuptools

documentation page.

=============================DEBUG ASSISTANCE=============================

If you are seeing a compilation error please try the following steps to

successfully install cryptography:

  1. Upgrade to the latest pip and try again. This will fix errors for most

users. See: This page has moved - pip documentation v22.2.2

  1. Read Installation — Cryptography 39.0.0.dev1 documentation for specific

instructions for your platform.

  1. Check our frequently asked questions for more information:

https://cryptography.io/en/latest/faq/

  1. Ensure you have a recent Rust toolchain installed:

https://cryptography.io/en/latest/installation/#rust

Python: 3.10.7

platform: Linux-3.18.79-armv7l-with-libc

pip: n/a

setuptools: 65.4.1

setuptools_rust: 1.5.2

rustc: n/a

=============================DEBUG ASSISTANCE=============================

error: cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --target armv7-linux-androideabi --release -v --features 'pyo3/extension-module pyo3/abi3-py36' -- --crate-type cdylib failed with code 101

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for cryptography Failed to build cryptography

ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects

I got the same … for me it helps to follow the instructions on Installation — Cryptography 39.0.0.dev1 documentation and do this:

sudo apt-get install build-essential libssl-dev libffi-dev \
    python3-dev cargo

as user pi