【问题标题】:Wheels not installing in system车轮未安装在系统中
【发布时间】:2021-10-18 04:53:30
【问题描述】:

我正在尝试在我的 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

在系统 1 中创建 virtualenv 后,我不知道 cffigreenletreadline 来自哪里。在系统 2 中它们不存在。

编辑2

这里有一个潜在的重要区别:在一个系统中我使用pyenv 来管理不同的python 版本,而在另一个系统中我使用asdfpyenv 使用了一个有趣的 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

【问题讨论】:

  • 如果您的系统上同时安装了 python 2.x 和 3.x,请尝试使用 pip3
  • @zweack 我在 python3 virtualenv 中。 virutalenv 中只有一个 pip
  • 你能显示pip list吗?
  • 另外,试试--verbose 标志
  • @hjpotter92 pip list 已添加。 pip install--verbose 标志没有提供任何新内容。

标签: python python-3.x pip python-wheel


【解决方案1】:

原来问题是pyenv安装了错误的python3.6版本。转到asdf 可以解决问题。

这是一个很难调试的问题,因为pip 没有提供足够的信息来理解为什么轮子不被接受。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-05-10
    • 2017-08-02
    • 1970-01-01
    • 2017-04-19
    • 1970-01-01
    • 1970-01-01
    • 2011-08-03
    • 1970-01-01
    相关资源
    最近更新 更多