blueFast
blueFast

Reputation: 44461

Wheels not installing in system

I am trying to install a binary package in my Ubuntu 20.04 (in a virtualenv):

» pip install --no-cache-dir --only-binary :all: packages/pyzmq-22.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl 
ERROR: pyzmq-22.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl is not a supported wheel on this platform.

I try the same in a similar system:

$ pip install --no-cache-dir --only-binary :all: packages/pyzmq-22.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl 
Processing /secusmart/projs/pyumi/packages/pyzmq-22.3.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Installing collected packages: pyzmq
Successfully installed pyzmq-22.3.0

The same happens with other packages.

System 1:

» pip install --no-cache-dir --only-binary :all: orjson
ERROR: Could not find a version that satisfies the requirement orjson (from versions: none)
ERROR: No matching distribution found for orjson
» python --version
Python 3.6.9 (2ad108f17bdb, Apr 07 2020, 02:59:05)
[PyPy 7.3.1 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]

System 2:

$ pip install --no-cache-dir --only-binary :all: orjson
Collecting orjson
  Downloading orjson-3.6.1-cp36-cp36m-manylinux_2_24_x86_64.whl (233 kB)
     |████████████████████████████████| 233 kB 18.9 MB/s 
Installing collected packages: orjson
Successfully installed orjson-3.6.1
$ python --version
Python 3.6.15
» type python3.6 # outside the virtualenv
python3.6 is /home/theuser/.pyenv/shims/python3.6

System 1 is:

» uname -a
Linux <hostname> 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
» pip --version
pip 21.2.4 from /home/theuser/.local/share/virtualenvs/xxx-G7YvHxC6/site-packages/pip (python 3.6)

System 2 is:

$ uname -a
Linux <hostname> 5.8.0-1042-azure #45~20.04.1-Ubuntu SMP Wed Sep 15 14:24:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ pip --version
pip 21.2.4 from /home/azureuser/.local/share/virtualenvs/xxx-G7YvHxC6/lib/python3.6/site-packages/pip (python 3.6)

How can I debug this problem?

Why is pip refusing to install the wheel?

How can I force pip to tell me what exactly does not like about my system that it refuses to install the wheel?

EDIT

As requested:

System 1:

» pip list
Package    Version
---------- -------
cffi       1.14.0
greenlet   0.4.13
pip        21.2.4
readline   6.2.4.1
setuptools 58.0.4
wheel      0.37.0

System 2:

$ pip list
Package    Version
---------- -------
orjson     3.6.1
pip        21.2.4
pyzmq      22.3.0
setuptools 58.1.0
wheel      0.37.0

I have no idea where cffi, greenlet and readline are comming from after creating the virtualenv, in System 1. In System 2 they are not present.

EDIT2

There is a potentially important difference here: in one system I used pyenv to manage different python versions, and in another system I used asdf. pyenv uses a funny python version (Red Hat in my Ubuntu box?!)

System 1:

» python --version
Python 3.6.9 (2ad108f17bdb, Apr 07 2020, 02:59:05)
[PyPy 7.3.1 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]
» python
Python 3.6.9 (2ad108f17bdb, Apr 07 2020, 02:59:05)
[PyPy 7.3.1 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
# Outside the virtualenv
» type python3.6
python3.6 is hashed (/home/theuser/.pyenv/shims/python3.6)

System 2:

$ python --version
Python 3.6.15
$ python3.6
Python 3.6.15 (default, Oct 14 2021, 05:40:22) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
# Outside the virtualenv
$ type python3.6
python3.6 is /home/azureuser/.asdf/shims/python3.6

Upvotes: 2

Views: 1626

Answers (1)

blueFast
blueFast

Reputation: 44461

It turns out the problem is that the wrong python3.6 version is installed by pyenv. Moving to asdf gets rid of the problem.

It's a difficult problem to debug because pip does not provide enough information to understand why the wheel is not accepted.

Upvotes: 2

Related Questions