首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >系统中未安装轮子

系统中未安装轮子
EN

Stack Overflow用户
提问于 2021-10-18 04:53:30
回答 1查看 155关注 0票数 2

我正在尝试在我的Ubuntu 20.04中安装一个二进制包(在virtualenv中):

代码语言:javascript
复制
» 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.

我在一个类似的系统中尝试了同样的方法:

代码语言:javascript
复制
$ 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:

代码语言:javascript
复制
» 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:

代码语言:javascript
复制
$ 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是:

代码语言:javascript
复制
» 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是:

代码语言:javascript
复制
$ 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:

代码语言:javascript
复制
» 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:

代码语言:javascript
复制
$ 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之后cffigreenletreadline是从哪里来的。在System 2中它们不存在。

EDIT2

这里有一个潜在的重要区别:在一个系统中,我使用pyenv来管理不同的python版本,而在另一个系统中,我使用asdfpyenv使用了一个有趣的python版本(我的Ubuntu盒子里有红帽?!)

系统1:

代码语言:javascript
复制
» 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:

代码语言:javascript
复制
$ 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
EN

回答 1

Stack Overflow用户

发布于 2021-10-18 06:47:48

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

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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69610932

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档