pip is to be updated?
Alpine Linux 3.15.4 was released on 4 Apr, 2022. At that point pip-22.0.4
was available. Still what was released is pip-20.3.4
(Jan 23, 2021). UPD Alpine Linux 3.15.0 was released on 24 Nov, 2021. At that point pip-21.3.1
was available.
$ docker run --rm -it alpine:3.15
/ # apk add py3-pip build-base python3-dev libffi-dev
/ # pip --version
pip 20.3.4 from /usr/lib/python3.9/site-packages/pip (python 3.9)
/ # pip install cryptography
...
running build_rust
=============================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: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation/ for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq/
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation/#rust
Python: 3.9.7
platform: Linux-5.17.1-arch1-1-x86_64-with
pip: n/a
setuptools: 62.2.0
setuptools_rust: 1.3.0
=============================DEBUG ASSISTANCE=============================
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
This package requires Rust >=1.41.0.
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
/ # pip install --upgrade pip
...
Successfully installed pip-22.1
/ # pip install cryptography
Collecting cryptography
Downloading cryptography-37.0.2-cp36-abi3-musllinux_1_1_x86_64.whl (4.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 6.3 MB/s eta 0:00:00
Collecting cffi>=1.12
Using cached cffi-1.15.0.tar.gz (484 kB)
Preparing metadata (setup.py) ... done
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Using legacy 'setup.py install' for cffi, since package 'wheel' is not installed.
Installing collected packages: pycparser, cffi, cryptography
Running setup.py install for cffi ... done
Successfully installed cffi-1.15.0 cryptography-37.0.2 pycparser-2.21
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
UPD I'm not sure when you decide to update packages, and looking at:
https://pkgs.alpinelinux.org/packages?name=py3-pip&branch=edge&arch=x86_64
an up-to-date version will supposedly be available in the next Alpine Linux release. So probably this issue can be closed?..