pyca / cryptography

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.
https://cryptography.io
Other
6.54k stars 1.5k forks source link

ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly #5914

Closed hopeswiller closed 3 years ago

hopeswiller commented 3 years ago

Building a docker image

FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-alpine3.10

RUN yes | curl --verbose --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

RUN apk add --update \
    build-base \
    python3-dev \
    musl-dev \
    libffi-dev \
    openssl-dev \
    cargo \
    postgresql-dev=11.11-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main 

WORKDIR /app
COPY requirements.txt requirements.txt

.....

i have latest version (3.4.6) of cryptography in my requirements file. i see this error in my logs error: Rust 1.34.2 does not match extension requirement >=1.41.0 but isn't 2nd line dockerfile supposed to install the latest version of rust ??

 Building wheel for cryptography (PEP 517): started
#11 133.5   Building wheel for cryptography (PEP 517): finished with status 'error'
#11 133.5   ERROR: Command errored out with exit status 1:
#11 133.5    command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpwfpmdjrc
#11 133.5        cwd: /tmp/pip-install-d3ajb41i/cryptography_5b39280450d64e45bef6398e30b8c35d
#11 133.5   Complete output (151 lines):
#11 133.5   running bdist_wheel
#11 133.5   running build
#11 133.5   running build_py
#11 133.5   creating build
#11 133.5   creating build/lib.linux-x86_64-3.8
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography
#11 133.5   copying src/cryptography/utils.py -> build/lib.linux-x86_64-3.8/cryptography
#11 133.5   copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-3.8/cryptography
#11 133.5   copying src/cryptography/fernet.py -> build/lib.linux-x86_64-3.8/cryptography
#11 133.5   copying src/cryptography/__about__.py -> build/lib.linux-x86_64-3.8/cryptography
#11 133.5   copying src/cryptography/__init__.py -> build/lib.linux-x86_64-3.8/cryptography
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat
#11 133.5   copying src/cryptography/hazmat/_types.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat
#11 133.5   copying src/cryptography/hazmat/_der.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat
#11 133.5   copying src/cryptography/hazmat/_oid.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat
#11 133.5   copying src/cryptography/hazmat/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   copying src/cryptography/x509/ocsp.py -> build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   copying src/cryptography/x509/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/x509
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/backends
#11 133.5   copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends
#11 133.5   copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings
#11 133.5   copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
#11 133.5   copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
#11 133.5   copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
#11 133.5   copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
#11 133.5   copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
#11 133.5   copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
#11 133.5   copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
#11 133.5   copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
#11 133.5   copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
#11 133.5   copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
#11 133.5   copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
#11 133.5   copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
#11 133.5   copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
#11 133.5   copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
#11 133.5   copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
#11 133.5   copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
#11 133.5   copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
#11 133.5   copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
#11 133.5   copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
#11 133.5   copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
#11 133.5   copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
#11 133.5   copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
#11 133.5   creating build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings/openssl
#11 133.5   copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings/openssl
#11 133.5   copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings/openssl
#11 133.5   copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings/openssl
#11 133.5   running egg_info
#11 133.5   writing src/cryptography.egg-info/PKG-INFO
#11 133.5   writing dependency_links to src/cryptography.egg-info/dependency_links.txt
#11 133.5   writing requirements to src/cryptography.egg-info/requires.txt
#11 133.5   writing top-level names to src/cryptography.egg-info/top_level.txt
#11 133.5   reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
#11 133.5   reading manifest template 'MANIFEST.in'
executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1
#11 133.5   no previously-included directories found matching 'docs/_build'
#11 133.5   warning: no previously-included files found matching 'vectors'
#11 133.5   warning: no previously-included files matching '*' found under directory 'vectors'
#11 133.5   warning: no previously-included files matching '*' found under directory '.github'
#11 133.5   warning: no previously-included files found matching 'release.py'
#11 133.5   warning: no previously-included files found matching '.coveragerc'
#11 133.5   warning: no previously-included files found matching 'codecov.yml'
#11 133.5   warning: no previously-included files found matching '.readthedocs.yml'
#11 133.5   warning: no previously-included files found matching 'dev-requirements.txt'
#11 133.5   warning: no previously-included files found matching 'tox.ini'
#11 133.5   warning: no previously-included files found matching 'mypy.ini'
#11 133.5   warning: no previously-included files matching '*' found under directory '.zuul.d'
#11 133.5   warning: no previously-included files matching '*' found under directory '.zuul.playbooks'
#11 133.5   writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
#11 133.5   copying src/cryptography/py.typed -> build/lib.linux-x86_64-3.8/cryptography
#11 133.5   warning: build_py: byte-compiling is disabled, skipping.
#11 133.5
#11 133.5   running build_ext
#11 133.5   generating cffi module 'build/temp.linux-x86_64-3.8/_padding.c'
#11 133.5   creating build/temp.linux-x86_64-3.8
#11 133.5   generating cffi module 'build/temp.linux-x86_64-3.8/_openssl.c'
#11 133.5   running build_rust
#11 133.5
#11 133.5       =============================DEBUG ASSISTANCE=============================
#11 133.5       If you are seeing a compilation error please try the following steps to
#11 133.5       successfully install cryptography:
#11 133.5       1) Upgrade to the latest pip and try again. This will fix errors for most
#11 133.5          users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
#11 133.5       2) Read https://cryptography.io/en/latest/installation.html for specific
#11 133.5          instructions for your platform.
#11 133.5       3) Check our frequently asked questions for more information:
#11 133.5          https://cryptography.io/en/latest/faq.html
#11 133.5       4) Ensure you have a recent Rust toolchain installed:
#11 133.5          https://cryptography.io/en/latest/installation.html#rust
#11 133.5       5) If you are experiencing issues with Rust for *this release only* you may
#11 133.5          set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
#11 133.5       =============================DEBUG ASSISTANCE=============================
#11 133.5
#11 133.5   error: Rust 1.34.2 does not match extension requirement >=1.41.0
#11 133.5   ----------------------------------------
#11 133.6   ERROR: Failed building wheel for cryptography

Failed to build cryptography
#11 145.6 ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

PLEASE ANY SUGGESTIONS

tiran commented 3 years ago

Alpine 3.10 is too old. You need at least Alpine 3.12.

hopeswiller commented 3 years ago

isn't there any other suggestion as the image I'm using doesn't have the alpine3.12 yet

tiran commented 3 years ago

Please open a bug report with @tiangolo and ask Sebastián Ramírez to provide a newer image or to use a distribution that supports manylinux wheels. Alpine is problematic.

alex commented 3 years ago

You can install Rust by following these instructions, instead of using the apk package: https://www.rust-lang.org/tools/install

hopeswiller commented 3 years ago

Please open a bug report with @tiangolo and ask Sebastián Ramírez to provide a newer image or to use a distribution that supports manylinux wheels. Alpine is problematic.

alright noted

hopeswiller commented 3 years ago

You can install Rust by following these instructions, instead of using the apk package: https://www.rust-lang.org/tools/install

that's exactly what im doing here

RUN yes | curl --verbose --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

in my dockerfile

alex commented 3 years ago

You're also installing cargo from apk, which places it first on your PATH.

On Sat, Mar 13, 2021 at 9:09 AM elmentdave @.***> wrote:

You can install Rust by following these instructions, instead of using the apk package: https://www.rust-lang.org/tools/install

that's exactly what im doing here

RUN yes | curl --verbose --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

in my dockerfile

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pyca/cryptography/issues/5914#issuecomment-798422017, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAGBH5DROYXYPLYNBKGI3TDNWY7ANCNFSM4ZDZJIJA .

-- All that is necessary for evil to succeed is for good people to do nothing.

hopeswiller commented 3 years ago

I've taken out cargo and using the installation as said in their docs but it still fails

FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-alpine3.10

RUN yes | curl --verbose --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

RUN apk add --update \
    build-base \
    python3-dev \
    musl-dev \
    libffi-dev \
    openssl-dev \
    postgresql-dev=11.11-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main 

WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip install --upgrade pip

...

logs now

.....
error: can't find Rust compiler
#12 197.4
#12 197.4   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.
#12 197.4
#12 197.4   To update pip, run:
#12 197.4
#12 197.4       pip install --upgrade pip
#12 197.4
#12 197.4   and then retry package installation.
#12 197.4
#12 197.4   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.
#12 197.4
#12 197.4   This package requires Rust >=1.41.0.
#12 197.4   ----------------------------------------
#12 197.4   ERROR: Failed building wheel for cryptography
.....
alex commented 3 years ago

You need to make sure Rust is on your PATH: https://github.com/pyca/infra/blob/main/runners/alpine/Dockerfile#L18

On Sat, Mar 13, 2021 at 10:27 AM elmentdave @.***> wrote:

I've taken out cargo and using the installation as said in their docs but it still fails

FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-alpine3.10

RUN yes | curl --verbose --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

RUN apk add --update \ build-base \ python3-dev \ musl-dev \ libffi-dev \ openssl-dev \ postgresql-dev=11.11-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main

WORKDIR /app COPY requirements.txt requirements.txt

...

logs now

..... error: can't find Rust compiler

12 197.4

12 197.4 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.

12 197.4

12 197.4 To update pip, run:

12 197.4

12 197.4 pip install --upgrade pip

12 197.4

12 197.4 and then retry package installation.

12 197.4

12 197.4 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.

12 197.4

12 197.4 This package requires Rust >=1.41.0.

12 197.4 ----------------------------------------

12 197.4 ERROR: Failed building wheel for cryptography

.....

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pyca/cryptography/issues/5914#issuecomment-798510588, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAGBESNBISLJXAUKRTNH3TDN77NANCNFSM4ZDZJIJA .

-- All that is necessary for evil to succeed is for good people to do nothing.

hopeswiller commented 3 years ago

You need to make sure Rust is on your PATH: https://github.com/pyca/infra/blob/main/runners/alpine/Dockerfile#L18 On Sat, Mar 13, 2021 at 10:27 AM elmentdave @.***> wrote: I've taken out cargo and using the installation as said in their docs but it still fails FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-alpine3.10 RUN yes | curl --verbose --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh RUN apk add --update \ build-base \ python3-dev \ musl-dev \ libffi-dev \ openssl-dev \ postgresql-dev=11.11-r0 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/main WORKDIR /app COPY requirements.txt requirements.txt ... logs now ..... error: can't find Rust compiler #12 197.4 #12 197.4 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. #12 197.4 #12 197.4 To update pip, run: #12 197.4 #12 197.4 pip install --upgrade pip #12 197.4 #12 197.4 and then retry package installation. #12 197.4 #12 197.4 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. #12 197.4 #12 197.4 This package requires Rust >=1.41.0. #12 197.4 ---------------------------------------- #12 197.4 ERROR: Failed building wheel for cryptography ..... — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#5914 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAGBESNBISLJXAUKRTNH3TDN77NANCNFSM4ZDZJIJA . -- All that is necessary for evil to succeed is for good people to do nothing.

Same issue persists though even after adding it to my path

hopeswiller commented 3 years ago

solved issue alpine3.13 and using this

RUN apk add --update \
    build-base \
    python3-dev \
    musl-dev \
    libffi-dev \
    openssl-dev \
    rust \
    cargo 

in dockerfile

ref : https://felixchr.blog/tag/docker/