-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'linux_aarch64') #367
Comments
Please paste the output of the following script (this requires the packaging library installed): from packaging import tags
from pprint import pprint
pprint(list(tags.sys_tags())) |
@agronholm, here you are
|
If you have previously built wheels around, is their platform tag also |
seems so
|
It looks like wheel has been using the wrong platform tag all along for this particular case (64-bit ARM running a 32-bit OS). It's the one corner case not covered by the logic in wheel's |
Please test the fix in the associated PR. |
Alex, thank you. Unfortunately, the error persists. Exact steps:
$ docker run -it python:3.8-buster
$ docker exec -it container_id /bin/bash
$ pip install git+https://github.com/pypa/wheel.git@b07333d62d333063e8d060fe66f6d3d26378b357
$ pip show wheel
Version: 0.35.1
$ pip install cffi
File "/usr/local/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 283, 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') By the way, both host and container OS are reported as 64 bit, if I interpret it correctly
|
Are you suggesting that I could reproduce this without ARM hardware? |
I remember that I have a bunch of raspberry pis at my disposal, but they're running Raspbian 9. They report |
turns out hyphen, not underscore ) Could you please PR? (Tried, insufficient permissions) >>> import distutils.util
>>> result = distutils.util.get_platform()
>>> result
'linux-aarch64' |
I didn't understand anything about your last message. Are you running a 64 bit OS or not? If you are, then it may be that |
there is check |
Got it. Try again now please. |
Tried, assertion error didn't go, unfortunately. Then tried to move up from the
if self.plat_name and not self.plat_name.startswith("macosx"):
self.plat_name = get_platform(self.bdist_dir)
plat_name = self.plat_name With this very strange fix cryptography was built finally when running |
What computer are you using? Is this anyhow connected to qemu or a docker image? When you run |
yes, Docker on Raspberry On host
In container
|
It seems both inside and outside the docker you are using aarch64. What does |
by the way, noticed that similar command numpy
cffi
Maybe that is why only some packages failed? I'll be back tomorrow |
Why is there an |
FWIW, on Raspberry Pi 3 + Raspbian 9, |
So you are using a 32-bit python on 64-bit arm. @agronholm this is on a raspberrypi 4 which supports 64 bit OSes. BTW, in the comment "Return a different tag for a 64-bit CPU running a 32-bit OS" it should be "Return a different tag for a 64-bit OS running a 32-bit python" |
Raspberry Pi 3 also has a 64-bit CPU, but Raspbian is only available in 32 bits. And yes, that would seem to be a more accurate comment. |
So the difference seems to be that the OS is 64-bit but the Python binary is 32-bit? |
If that is the case, this begs the question: why does |
Because it parses |
@RomanGurinovich since I do not currently have access to an aarch64 machine with a 64-bit OS, I need you to figure out where the |
let me try |
Just to clarify for others that might be struggling with where to set this: this should be set with 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. |
So where did we end up with this? I don't own the necessary hardware to test this. |
it builds with @nioncode instruction |
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 can't reproduce this. Can you @RomanGurinovich repro it now? For me, |
I think the original issue was about building 32-bit wheels inside a docker, so it should not be building aarch64 wheels. |
I followed OP's instructions but could not reproduce the error. I don't know what to do. |
@agronholm are you running a 64bit kernel with 32bit userspace? Last time I checked (with CoreELEC and docker) this was broken for me as described in #367 (comment) |
I'm running 64-bit Raspberry Pi OS beta. It has 64-bit kernel and userspace. I guess I need this specific CoreELEC distro then...? |
Or maybe I can repro this by running the linux/arm/v7 variant of the python docker image. |
If you run 64bit userspace on a 64bit kernel, everything works fine (this is more or less the default configuration similar to amd64, just on arm). Maybe you could reproduce with a 32bit raspbian, but I cannot guarantee that, since I only worked with CoreELEC before, which is a bit more work to set up I guess. |
Well, I tried running the armv7 variant of Python there (checked that sys.maxsize indicated 32-bit) and to my surprise it still built an aarch64 wheel, no errors. The library worked fine too. |
OP said the problem occurred on Raspbian 10 so I'll try with that. |
Alex, I'll have access to the same device next week and will try to reproduce |
This is what I did on Raspbian 10:
It built a |
Oh, this was Raspbian 9, not 10. Does that make a difference? |
To make sure, I repeated this process with Raspbian 10, and got the same results. Everything works as expected. |
I even downgraded wheel to v0.35.1 which was the current version at the time, and it still worked as expected. |
Good news, everyone, Just setting In this setup At the same time, running previous setup failed as before. Nothing else changed on the host or Docker
Thus for the combination of the recent versions of the language and packages everything is fine |
Where did you get this OS image? This is what I have:
|
I installed the 64-bit beta of Raspbian 10, but even that has both 64-bit kernel and 64-bit userland. |
I tried piCorePlayer too but I have no clue on how to operate it. |
I would really welcome a clear set of repro instructions. It's been over 6 months since this was opened and I still haven't been able to repro the problem. |
It seems like the people who reported this issue are not interested in helping @agronholm pursue a reproducer for it, so perhaps the issue should be closed. |
If anyone is interested in re-opening, I've been struggling with this for a week or so and documented what is (for me) a reproducible issue here. With current versions of |
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
Details
OS : Raspbian GNU/Linux 10 (buster)
Docker: 19.03.12
Base: python:3.8-buster
The text was updated successfully, but these errors were encountered: