我正在尝试在我的Ubuntu 20.04中安装一个二进制包(在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.我在一个类似的系统中尝试了同样的方法:
$ 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同样的情况也发生在其他包中。
系统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)]系统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系统1是:
» 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)系统2是:
$ 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)如何调试此问题?
为什么pip拒绝安装轮子?
我怎么才能强迫pip告诉我它到底不喜欢我的系统的什么地方,它拒绝安装轮子呢?
编辑
根据要求:
系统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系统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我不知道在System 1中创建了virtualenv之后cffi、greenlet和readline是从哪里来的。在System 2中它们不存在。
EDIT2
这里有一个潜在的重要区别:在一个系统中,我使用pyenv来管理不同的python版本,而在另一个系统中,我使用asdf。pyenv使用了一个有趣的python版本(我的Ubuntu盒子里有红帽?!)
系统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)系统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发布于 2021-10-18 06:47:48
原来问题是pyenv安装了错误的python3.6版本。迁移到asdf可以解决这个问题。
这是一个很难调试的问题,因为pip没有提供足够的信息来理解为什么轮子不被接受。
https://stackoverflow.com/questions/69610932
复制相似问题