Skip to content
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

Pip makes an incompatible wheel (aarch64) #9980

Closed
1 task done
n8henrie opened this issue May 13, 2021 · 6 comments
Closed
1 task done

Pip makes an incompatible wheel (aarch64) #9980

n8henrie opened this issue May 13, 2021 · 6 comments
Labels
resolution: wrong project Should be reported elsewhere

Comments

@n8henrie
Copy link

n8henrie commented May 13, 2021

Description

I'm running a raspberry pi on the 64 bit kernel and running into odd behavior when installing a local numpy wheel that was created as part of a previous install.

It seems that pip creates a wheel for aarch64, but then reports that this is incompatible with pip debug --verbose.

$ cat /etc/debian_version 
10.9
$ uname -r
5.10.17-v8+
$ python3 -VV
Python 3.9.4 (default, Apr 28 2021, 22:29:59)
[GCC 8.3.0]
$ python3 -m venv .venv
$ source ./.venv/bin/activate
(.venv) $ pip install --upgrade pip setuptools wheel
...
(.venv) $ pip freeze --all | grep -e pip -e setuptools -e wheel
pip==21.1.1
setuptools==56.2.0
wheel==0.36.2
(.venv) $ pip install cython
...
Successfully installed cython-0.29.23
(.venv) $ pip install numpy --no-use-pep517
...
Collecting numpy
  Using cached numpy-1.20.3.zip (7.8 MB)
Building wheels for collected packages: numpy
  Building wheel for numpy (setup.py) ... done
  Created wheel for numpy: filename=numpy-1.20.3-cp39-cp39-linux_aarch64.whl size=11645249 sha256=2f5824b34312f8c811db2692df96b8abb479862f55e404a8119efa3a5c8f51ae
  Stored in directory: /home/me/.cache/pip/wheels/7a/34/64/4b83a3f59d2eb2ba5757834a9c43b2e3389f3b8a309b4905ba
Successfully built numpy
Installing collected packages: numpy
Successfully installed numpy-1.20.3
(.venv) $ deactivate
$ rm -r .venv
$ python3 -m venv .venv
$ source ./.venv/bin/activate
(.venv) $ pip install --upgrade pip setuptools wheel
...
(.venv) $ pip install ~/.cache/pip/wheels/7a/34/64/4b83a3f59d2eb2ba5757834a9c43b2e3389f3b8a309b4905ba/numpy-1.20.3-cp39-cp39-linux_aarch64.whl 
Looking in indexes: ...
Looking in links: ...
ERROR: numpy-1.20.3-cp39-cp39-linux_aarch64.whl is not a supported wheel on this platform.
(.venv) $ pip debug --verbose
pip version: pip 21.1.1 from /tmp/tmp.5OmPS2sBcD/.venv/lib/python3.9/site-packages/pip (python 3.9)
sys.version: 3.9.4 (default, Apr 28 2021, 22:29:59) 
[GCC 8.3.0]
sys.executable: /tmp/tmp.5OmPS2sBcD/.venv/bin/python3
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: wheel, install, download
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /tmp/tmp.5OmPS2sBcD/.venv/lib/python3.9/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.4
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.1
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==20.9
  pep517==0.10.0
  progress==1.5
  pyparsing==2.4.7
  requests==2.25.1
  certifi==2020.12.05
  chardet==4.0.0
  idna==3.1
  urllib3==1.26.4
  resolvelib==0.7.0
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.15.0
  tenacity==7.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  toml==0.10.2
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 306
  cp39-cp39-manylinux_2_28_armv7l
  cp39-cp39-manylinux_2_27_armv7l
  cp39-cp39-manylinux_2_26_armv7l
  cp39-cp39-manylinux_2_25_armv7l
  cp39-cp39-manylinux_2_24_armv7l
  cp39-cp39-manylinux_2_23_armv7l
  cp39-cp39-manylinux_2_22_armv7l
  cp39-cp39-manylinux_2_21_armv7l
  cp39-cp39-manylinux_2_20_armv7l
  cp39-cp39-manylinux_2_19_armv7l
  cp39-cp39-manylinux_2_18_armv7l
  cp39-cp39-manylinux_2_17_armv7l
  cp39-cp39-manylinux2014_armv7l
  cp39-cp39-linux_armv7l
  cp39-abi3-manylinux_2_28_armv7l
  cp39-abi3-manylinux_2_27_armv7l
  cp39-abi3-manylinux_2_26_armv7l
  cp39-abi3-manylinux_2_25_armv7l
  cp39-abi3-manylinux_2_24_armv7l
  cp39-abi3-manylinux_2_23_armv7l
  cp39-abi3-manylinux_2_22_armv7l
  cp39-abi3-manylinux_2_21_armv7l
  cp39-abi3-manylinux_2_20_armv7l
  cp39-abi3-manylinux_2_19_armv7l
  cp39-abi3-manylinux_2_18_armv7l
  cp39-abi3-manylinux_2_17_armv7l
  cp39-abi3-manylinux2014_armv7l
  cp39-abi3-linux_armv7l
  cp39-none-manylinux_2_28_armv7l
  cp39-none-manylinux_2_27_armv7l
  cp39-none-manylinux_2_26_armv7l
  cp39-none-manylinux_2_25_armv7l
  cp39-none-manylinux_2_24_armv7l
  cp39-none-manylinux_2_23_armv7l
  cp39-none-manylinux_2_22_armv7l
  cp39-none-manylinux_2_21_armv7l
  cp39-none-manylinux_2_20_armv7l
  cp39-none-manylinux_2_19_armv7l
  cp39-none-manylinux_2_18_armv7l
  cp39-none-manylinux_2_17_armv7l
  cp39-none-manylinux2014_armv7l
  cp39-none-linux_armv7l
  cp38-abi3-manylinux_2_28_armv7l
  cp38-abi3-manylinux_2_27_armv7l
  cp38-abi3-manylinux_2_26_armv7l
  cp38-abi3-manylinux_2_25_armv7l
  cp38-abi3-manylinux_2_24_armv7l
  cp38-abi3-manylinux_2_23_armv7l
  cp38-abi3-manylinux_2_22_armv7l
  cp38-abi3-manylinux_2_21_armv7l
  cp38-abi3-manylinux_2_20_armv7l
  cp38-abi3-manylinux_2_19_armv7l
  cp38-abi3-manylinux_2_18_armv7l
  cp38-abi3-manylinux_2_17_armv7l
  cp38-abi3-manylinux2014_armv7l
  cp38-abi3-linux_armv7l
  cp37-abi3-manylinux_2_28_armv7l
  cp37-abi3-manylinux_2_27_armv7l
  cp37-abi3-manylinux_2_26_armv7l
  cp37-abi3-manylinux_2_25_armv7l
  cp37-abi3-manylinux_2_24_armv7l
  cp37-abi3-manylinux_2_23_armv7l
  cp37-abi3-manylinux_2_22_armv7l
  cp37-abi3-manylinux_2_21_armv7l
  cp37-abi3-manylinux_2_20_armv7l
  cp37-abi3-manylinux_2_19_armv7l
  cp37-abi3-manylinux_2_18_armv7l
  cp37-abi3-manylinux_2_17_armv7l
  cp37-abi3-manylinux2014_armv7l
  cp37-abi3-linux_armv7l
  cp36-abi3-manylinux_2_28_armv7l
  cp36-abi3-manylinux_2_27_armv7l
  cp36-abi3-manylinux_2_26_armv7l
  cp36-abi3-manylinux_2_25_armv7l
  cp36-abi3-manylinux_2_24_armv7l
  cp36-abi3-manylinux_2_23_armv7l
  cp36-abi3-manylinux_2_22_armv7l
  cp36-abi3-manylinux_2_21_armv7l
  cp36-abi3-manylinux_2_20_armv7l
  cp36-abi3-manylinux_2_19_armv7l
  cp36-abi3-manylinux_2_18_armv7l
  cp36-abi3-manylinux_2_17_armv7l
  cp36-abi3-manylinux2014_armv7l
  cp36-abi3-linux_armv7l
  cp35-abi3-manylinux_2_28_armv7l
  cp35-abi3-manylinux_2_27_armv7l
  cp35-abi3-manylinux_2_26_armv7l
  cp35-abi3-manylinux_2_25_armv7l
  cp35-abi3-manylinux_2_24_armv7l
  cp35-abi3-manylinux_2_23_armv7l
  cp35-abi3-manylinux_2_22_armv7l
  cp35-abi3-manylinux_2_21_armv7l
  cp35-abi3-manylinux_2_20_armv7l
  cp35-abi3-manylinux_2_19_armv7l
  cp35-abi3-manylinux_2_18_armv7l
  cp35-abi3-manylinux_2_17_armv7l
  cp35-abi3-manylinux2014_armv7l
  cp35-abi3-linux_armv7l
  cp34-abi3-manylinux_2_28_armv7l
  cp34-abi3-manylinux_2_27_armv7l
  cp34-abi3-manylinux_2_26_armv7l
  cp34-abi3-manylinux_2_25_armv7l
  cp34-abi3-manylinux_2_24_armv7l
  cp34-abi3-manylinux_2_23_armv7l
  cp34-abi3-manylinux_2_22_armv7l
  cp34-abi3-manylinux_2_21_armv7l
  cp34-abi3-manylinux_2_20_armv7l
  cp34-abi3-manylinux_2_19_armv7l
  cp34-abi3-manylinux_2_18_armv7l
  cp34-abi3-manylinux_2_17_armv7l
  cp34-abi3-manylinux2014_armv7l
  cp34-abi3-linux_armv7l
  cp33-abi3-manylinux_2_28_armv7l
  cp33-abi3-manylinux_2_27_armv7l
  cp33-abi3-manylinux_2_26_armv7l
  cp33-abi3-manylinux_2_25_armv7l
  cp33-abi3-manylinux_2_24_armv7l
  cp33-abi3-manylinux_2_23_armv7l
  cp33-abi3-manylinux_2_22_armv7l
  cp33-abi3-manylinux_2_21_armv7l
  cp33-abi3-manylinux_2_20_armv7l
  cp33-abi3-manylinux_2_19_armv7l
  cp33-abi3-manylinux_2_18_armv7l
  cp33-abi3-manylinux_2_17_armv7l
  cp33-abi3-manylinux2014_armv7l
  cp33-abi3-linux_armv7l
  cp32-abi3-manylinux_2_28_armv7l
  cp32-abi3-manylinux_2_27_armv7l
  cp32-abi3-manylinux_2_26_armv7l
  cp32-abi3-manylinux_2_25_armv7l
  cp32-abi3-manylinux_2_24_armv7l
  cp32-abi3-manylinux_2_23_armv7l
  cp32-abi3-manylinux_2_22_armv7l
  cp32-abi3-manylinux_2_21_armv7l
  cp32-abi3-manylinux_2_20_armv7l
  cp32-abi3-manylinux_2_19_armv7l
  cp32-abi3-manylinux_2_18_armv7l
  cp32-abi3-manylinux_2_17_armv7l
  cp32-abi3-manylinux2014_armv7l
  cp32-abi3-linux_armv7l
  py39-none-manylinux_2_28_armv7l
  py39-none-manylinux_2_27_armv7l
  py39-none-manylinux_2_26_armv7l
  py39-none-manylinux_2_25_armv7l
  py39-none-manylinux_2_24_armv7l
  py39-none-manylinux_2_23_armv7l
  py39-none-manylinux_2_22_armv7l
  py39-none-manylinux_2_21_armv7l
  py39-none-manylinux_2_20_armv7l
  py39-none-manylinux_2_19_armv7l
  py39-none-manylinux_2_18_armv7l
  py39-none-manylinux_2_17_armv7l
  py39-none-manylinux2014_armv7l
  py39-none-linux_armv7l
  py3-none-manylinux_2_28_armv7l
  py3-none-manylinux_2_27_armv7l
  py3-none-manylinux_2_26_armv7l
  py3-none-manylinux_2_25_armv7l
  py3-none-manylinux_2_24_armv7l
  py3-none-manylinux_2_23_armv7l
  py3-none-manylinux_2_22_armv7l
  py3-none-manylinux_2_21_armv7l
  py3-none-manylinux_2_20_armv7l
  py3-none-manylinux_2_19_armv7l
  py3-none-manylinux_2_18_armv7l
  py3-none-manylinux_2_17_armv7l
  py3-none-manylinux2014_armv7l
  py3-none-linux_armv7l
  py38-none-manylinux_2_28_armv7l
  py38-none-manylinux_2_27_armv7l
  py38-none-manylinux_2_26_armv7l
  py38-none-manylinux_2_25_armv7l
  py38-none-manylinux_2_24_armv7l
  py38-none-manylinux_2_23_armv7l
  py38-none-manylinux_2_22_armv7l
  py38-none-manylinux_2_21_armv7l
  py38-none-manylinux_2_20_armv7l
  py38-none-manylinux_2_19_armv7l
  py38-none-manylinux_2_18_armv7l
  py38-none-manylinux_2_17_armv7l
  py38-none-manylinux2014_armv7l
  py38-none-linux_armv7l
  py37-none-manylinux_2_28_armv7l
  py37-none-manylinux_2_27_armv7l
  py37-none-manylinux_2_26_armv7l
  py37-none-manylinux_2_25_armv7l
  py37-none-manylinux_2_24_armv7l
  py37-none-manylinux_2_23_armv7l
  py37-none-manylinux_2_22_armv7l
  py37-none-manylinux_2_21_armv7l
  py37-none-manylinux_2_20_armv7l
  py37-none-manylinux_2_19_armv7l
  py37-none-manylinux_2_18_armv7l
  py37-none-manylinux_2_17_armv7l
  py37-none-manylinux2014_armv7l
  py37-none-linux_armv7l
  py36-none-manylinux_2_28_armv7l
  py36-none-manylinux_2_27_armv7l
  py36-none-manylinux_2_26_armv7l
  py36-none-manylinux_2_25_armv7l
  py36-none-manylinux_2_24_armv7l
  py36-none-manylinux_2_23_armv7l
  py36-none-manylinux_2_22_armv7l
  py36-none-manylinux_2_21_armv7l
  py36-none-manylinux_2_20_armv7l
  py36-none-manylinux_2_19_armv7l
  py36-none-manylinux_2_18_armv7l
  py36-none-manylinux_2_17_armv7l
  py36-none-manylinux2014_armv7l
  py36-none-linux_armv7l
  py35-none-manylinux_2_28_armv7l
  py35-none-manylinux_2_27_armv7l
  py35-none-manylinux_2_26_armv7l
  py35-none-manylinux_2_25_armv7l
  py35-none-manylinux_2_24_armv7l
  py35-none-manylinux_2_23_armv7l
  py35-none-manylinux_2_22_armv7l
  py35-none-manylinux_2_21_armv7l
  py35-none-manylinux_2_20_armv7l
  py35-none-manylinux_2_19_armv7l
  py35-none-manylinux_2_18_armv7l
  py35-none-manylinux_2_17_armv7l
  py35-none-manylinux2014_armv7l
  py35-none-linux_armv7l
  py34-none-manylinux_2_28_armv7l
  py34-none-manylinux_2_27_armv7l
  py34-none-manylinux_2_26_armv7l
  py34-none-manylinux_2_25_armv7l
  py34-none-manylinux_2_24_armv7l
  py34-none-manylinux_2_23_armv7l
  py34-none-manylinux_2_22_armv7l
  py34-none-manylinux_2_21_armv7l
  py34-none-manylinux_2_20_armv7l
  py34-none-manylinux_2_19_armv7l
  py34-none-manylinux_2_18_armv7l
  py34-none-manylinux_2_17_armv7l
  py34-none-manylinux2014_armv7l
  py34-none-linux_armv7l
  py33-none-manylinux_2_28_armv7l
  py33-none-manylinux_2_27_armv7l
  py33-none-manylinux_2_26_armv7l
  py33-none-manylinux_2_25_armv7l
  py33-none-manylinux_2_24_armv7l
  py33-none-manylinux_2_23_armv7l
  py33-none-manylinux_2_22_armv7l
  py33-none-manylinux_2_21_armv7l
  py33-none-manylinux_2_20_armv7l
  py33-none-manylinux_2_19_armv7l
  py33-none-manylinux_2_18_armv7l
  py33-none-manylinux_2_17_armv7l
  py33-none-manylinux2014_armv7l
  py33-none-linux_armv7l
  py32-none-manylinux_2_28_armv7l
  py32-none-manylinux_2_27_armv7l
  py32-none-manylinux_2_26_armv7l
  py32-none-manylinux_2_25_armv7l
  py32-none-manylinux_2_24_armv7l
  py32-none-manylinux_2_23_armv7l
  py32-none-manylinux_2_22_armv7l
  py32-none-manylinux_2_21_armv7l
  py32-none-manylinux_2_20_armv7l
  py32-none-manylinux_2_19_armv7l
  py32-none-manylinux_2_18_armv7l
  py32-none-manylinux_2_17_armv7l
  py32-none-manylinux2014_armv7l
  py32-none-linux_armv7l
  py31-none-manylinux_2_28_armv7l
  py31-none-manylinux_2_27_armv7l
  py31-none-manylinux_2_26_armv7l
  py31-none-manylinux_2_25_armv7l
  py31-none-manylinux_2_24_armv7l
  py31-none-manylinux_2_23_armv7l
  py31-none-manylinux_2_22_armv7l
  py31-none-manylinux_2_21_armv7l
  py31-none-manylinux_2_20_armv7l
  py31-none-manylinux_2_19_armv7l
  py31-none-manylinux_2_18_armv7l
  py31-none-manylinux_2_17_armv7l
  py31-none-manylinux2014_armv7l
  py31-none-linux_armv7l
  py30-none-manylinux_2_28_armv7l
  py30-none-manylinux_2_27_armv7l
  py30-none-manylinux_2_26_armv7l
  py30-none-manylinux_2_25_armv7l
  py30-none-manylinux_2_24_armv7l
  py30-none-manylinux_2_23_armv7l
  py30-none-manylinux_2_22_armv7l
  py30-none-manylinux_2_21_armv7l
  py30-none-manylinux_2_20_armv7l
  py30-none-manylinux_2_19_armv7l
  py30-none-manylinux_2_18_armv7l
  py30-none-manylinux_2_17_armv7l
  py30-none-manylinux2014_armv7l
  py30-none-linux_armv7l
  cp39-none-any
  py39-none-any
  py3-none-any
  py38-none-any
  py37-none-any
  py36-none-any
  py35-none-any
  py34-none-any
  py33-none-any
  py32-none-any
  py31-none-any
  py30-none-any

Expected behavior

The wheel created during pip install should be installable.

pip version

21.1.1

Python version

3.9.4

OS

Raspbian Buster on 64 bit kernel (armv8)

How to Reproduce

See above

Output

No response

Code of Conduct

@n8henrie n8henrie added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels May 13, 2021
@n8henrie
Copy link
Author

So in short, upon (successfully) installing numpy, pip is creating a -cp39-cp39-linux_aarch64.whl wheel, but when I try to install that same wheel I get is not a supported wheel on this platform.

pip debug --verbose | grep -i -e aarch -e armv8 shows that it indeed doesn't seem to be recognizing aarch64 or armv8 wheels as being compatible, only armv7l wheels.

@uranusjr
Copy link
Member

uranusjr commented May 13, 2021

Pip only consumes and does not build the wheel. You need to report to pypa/wheel instead.

@uranusjr uranusjr added resolution: wrong project Should be reported elsewhere and removed S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels May 13, 2021
@n8henrie
Copy link
Author

@uranusjr would you re-open if I changed the title to "pip doesn't recognize system-compatible wheel"?

$ uname -m
aarch64

Wheel seems to be appropriately building an aarch64 wheel, the issue is that pip says it's not compatible when it seems like it should be (right?) and refuses to install.

@uranusjr
Copy link
Member

Can you post the result of the following?

import sys
print(sys.maxsize)

pip does recognise 64-bit ARM, but your compatible tag output seems to suggest Python is reporting itself as 32-bit binary (cross-compiled), not 64-bit.

@n8henrie
Copy link
Author

n8henrie commented May 13, 2021

Good call. I forgot that even when running a 64b kernel that Raspbian still uses a 32b userland; that's likely the problem, and you're correct it's a wheel issue. Thanks for pointing me in the right direction.

(.venv) $ python -c 'import sys; print(sys.version); print(sys.maxsize == 2**31 - 1)'
3.9.4 (default, Apr 28 2021, 22:29:59) 
[GCC 8.3.0]
True

Looks like a relevant issue is open unresolved: pypa/wheel#367

@n8henrie
Copy link
Author

For future readers / searchers, as a quick fix, I was able to convince pip wheel to create a armv7l wheel that pip was thereafter happy to install by export _PYTHON_HOST_PLATFORM=linux_armv7l as noted in the issue linked above.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: wrong project Should be reported elsewhere
Projects
None yet
Development

No branches or pull requests

2 participants