我在 Python 中遇到了一个有线问题,问题是 cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl
不适用于 SLES 操作系统。
我在我的仓库中添加了一个 CI/CD,当我从 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 (这两个文件大小相同但哈希值不同)
我想了解 python 包中 manylinux1_x86_64 与 manylinux2010_x86_64 之间的区别。
提前致谢。
最佳答案
根据这篇文章:manylinux tag , manylinux2010 意味着它需要 pip >= 19.0
sudo python3 -m pip install --upgrade pip
可能有帮助。manylinux 项目的目标是提供一种方便的方式来分发二进制 Python 扩展作为 Linux 上的轮子。这一努力产生了PEP 513进一步增强了 PEP 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 ║
╚════════════════╩══════════════════════════════════╝
关于python - PIP安装程序中manylinux1和manylinux2020轮文件的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61796811/