wheel: AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'linux_aarch64')

Experiencing this error when pip install numpy and cryptography in Docker container on Raspberry. While images built in May and June of 2020 worked well. Tried and it didn’t work:

  • downgrading versions of wheel and packages,

  • vice versa, upgrading pip, wheel and packages to the very latest versions

  • pip install cryptography --no-binary cryptography

Maybe it is an arm64 issue. For instance, cryptography doesn’t list this platform as supported https://cryptography.io/en/latest/installation/#build-on-linux


Workaround

pip install -e git+https://github.com/pyca/cryptography.git#egg=cryptography

Details

      File "/tmp/pip-build-env-n8ueeulb/overlay/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
        assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
    AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'linux_aarch64')
  ...
  ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

OS : Raspbian GNU/Linux 10 (buster) Docker: 19.03.12 Base: python:3.8-buster

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 68 (43 by maintainers)

Commits related to this issue

Most upvoted comments

I was able to work around it by setting _PYTHON_HOST_PLATFORM=linux_armv7l

Just to clarify for others that might be struggling with where to set this: this should be set with ENV in the Dockerfile before doing the pip install step, e.g.:

ENV _PYTHON_HOST_PLATFORM linux_armv7l

This was required to build some wheels in Docker on CoreELEC, which uses a 64bit kernel with 32bit userspace as well.

I now have a rpi3 in my possession so I could try to figure out if there’s anything wheel can do about this.

I wonder which command sets the value then. This is probably not unique to your case, so I could take a stab at debugging this myself.