PIP 安装程序中 manylinux1 与 manylinux2020 wheel 文件的区别

问题描述 投票:0回答:1

我在 Python 中遇到一个奇怪的问题,问题是

cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl
在 SLES 操作系统上不工作。

我有一个 CI/CD 添加到我的 repo,当我从 requirements.txt 下载包到本地文件夹时

dist-packages
。 Jenkins Slave 机器运行在 RedHat Linux 上。因此,它与此文件一起下载
cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl
而我的运行时在 SLES OS 11 中,这需要
cryptography-2.9.2-cp35-abi3-manylinux1_x86_64.whl
.

这个特定的依赖项

cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl
是从 RedHat 下载的,当我将它重新分发到 SLES OS 时,这个依赖项因以下错误而失败。

 ERROR: Could not find a version that satisfies the requirement cryptography>=2.1.4 (from azure-identity->-r requirements.txt (line 2)) (from versions: none)
    ERROR: No matching distribution found for cryptography>=2.1.4 (from azure-identity->-r requirements.txt (line 2))

如果我将依赖项名称从

cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl
更改为
cryptography-2.9.2-cp35-abi3-manylinux1_x86_64.whl
它在 SLES OS 机器上运行良好。

当我签入 PyPI 时https://pypi.org/project/cryptography/#modal-close(这两个文件大小相同但哈希值不同)

我想了解 manylinux1_x86_64 与 manylinux2010_x86_64 在 python 包中的区别。

提前致谢。

python pip python-wheel python-manylinux
1个回答
7
投票

根据这篇文章:manylinux标签,manylinux2010意味着它需要

pip >= 19.0

sudo python3 -m pip install --upgrade pip

可能有帮助。


manylinux 项目的目标是提供一种方便的方式来分发二进制 Python 扩展作为 Linux 上的轮子。这项工作产生了 PEP 513PEP 571 定义了

manylinux2010_x86_64
manylinux2010_i686
平台标签。

╔════════════════╦══════════════════════════════════╗
║  manylinux tag ║ Client-side pip version required ║
╠════════════════╬══════════════════════════════════╣
║  manylinux2014 ║ pip >= 19.3                      ║
║  manylinux2010 ║ pip >= 19.0                      ║
║  manylinux1    ║ pip >= 8.1.0                     ║
╚════════════════╩══════════════════════════════════╝
© www.soinside.com 2019 - 2024. All rights reserved.