我正在我的Mac 上创建一个poetry.lock 文件。然后,我用它构建一个基于 Debian 的 Docker 镜像。我的问题如下:是否能保证 Debian 映像能够找到确切的软件包?\n我可能是错的,但我记得软件包可能并不存在于每个操作系统的每个版本中。当考虑操作系统特定的软件包(Windows 与 Unix)时,\xe2\x80\x99s 似乎是合理的。但是 Debian 和 Mac(均基于 Unix)怎么样?我是否应该期望至少大多数软件包都存在于同一版本中?
\nN1n*_*ngu 10
但你必须明白,这与诗歌、pipenv 或 pip “无关”,而是与每个包版本可以分发到多个平台这一事实有关。
pip 将选择一个与发出安装的系统的兼容平台标签相匹配的特定轮子(请参阅 的输出pip debug)。
对于大多数纯Python包:在索引中只能找到一个轮子和一个源代码发行版(tarball),除非你另有说明,否则pip将选择轮子。因此,不同操作系统的安装几乎是相同的。只有Python解释器会有所不同。
对于具有 C(或其他)扩展的包:该包将针对一系列平台进行预编译,pip 将为您的系统和 python 版本选择最佳的 mach。如果没有预构建的轮子与您的系统兼容,则 pip 被迫回退到源代码发行版并对其进行编译,此时您将需要该包所需的任何构建工具链(C 编译器、CPython 头文件等)。
这是通过以下方式实现的
有理由相信二进制扩展将是等效的,并且来自完全相同的源代码,执行相同的行为,仅存在潜在的特定于平台的错误。然而,严格来说,编译后的代码通常会有所不同。
如果您最终编译了包:
如果您最终下载了预建的轮子:
对于纯 Python 包来说,这种情况很少发生:理论上是可能的,但维护者宁愿构建具有兼容性样板的单个轮子,也不愿为每个 Python 版本制作不同的代码库,即使对于具有两个实际公共轮子的 Python-2 和 3 也是如此py{2,3}-none-any。
watchdog = [
{file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9693f35162dc6208d10b10ddf0458cc09ad70c30ba689d9206e02cd836ce28a3"},
{file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:aba5c812f8ee8a3ff3be51887ca2d55fb8e268439ed44110d3846e4229eb0e8b"},
{file = "watchdog-2.1.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4ae38bf8ba6f39d5b83f78661273216e7db5b00f08be7592062cb1fc8b8ba542"},
{file = "watchdog-2.1.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ad6f1796e37db2223d2a3f302f586f74c72c630b48a9872c1e7ae8e92e0ab669"},
{file = "watchdog-2.1.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:922a69fa533cb0c793b483becaaa0845f655151e7256ec73630a1b2e9ebcb660"},
{file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b2fcf9402fde2672545b139694284dc3b665fd1be660d73eca6805197ef776a3"},
{file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3386b367e950a11b0568062b70cc026c6f645428a698d33d39e013aaeda4cc04"},
{file = "watchdog-2.1.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f1c00aa35f504197561060ca4c21d3cc079ba29cf6dd2fe61024c70160c990b"},
{file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b52b88021b9541a60531142b0a451baca08d28b74a723d0c99b13c8c8d48d604"},
{file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8047da932432aa32c515ec1447ea79ce578d0559362ca3605f8e9568f844e3c6"},
{file = "watchdog-2.1.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e92c2d33858c8f560671b448205a268096e17870dcf60a9bb3ac7bfbafb7f5f9"},
{file = "watchdog-2.1.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b7d336912853d7b77f9b2c24eeed6a5065d0a0cc0d3b6a5a45ad6d1d05fb8cd8"},
{file = "watchdog-2.1.6-py3-none-manylinux2014_aarch64.whl", hash = "sha256:cca7741c0fcc765568350cb139e92b7f9f3c9a08c4f32591d18ab0a6ac9e71b6"},
{file = "watchdog-2.1.6-py3-none-manylinux2014_armv7l.whl", hash = "sha256:25fb5240b195d17de949588628fdf93032ebf163524ef08933db0ea1f99bd685"},
{file = "watchdog-2.1.6-py3-none-manylinux2014_i686.whl", hash = "sha256:be9be735f827820a06340dff2ddea1fb7234561fa5e6300a62fe7f54d40546a0"},
{file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64.whl", hash = "sha256:d0d19fb2441947b58fbf91336638c2b9f4cc98e05e1045404d7a4cb7cddc7a65"},
{file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:3becdb380d8916c873ad512f1701f8a92ce79ec6978ffde92919fd18d41da7fb"},
{file = "watchdog-2.1.6-py3-none-manylinux2014_s390x.whl", hash = "sha256:ae67501c95606072aafa865b6ed47343ac6484472a2f95490ba151f6347acfc2"},
{file = "watchdog-2.1.6-py3-none-manylinux2014_x86_64.whl", hash = "sha256:e0f30db709c939cabf64a6dc5babb276e6d823fd84464ab916f9b9ba5623ca15"},
{file = "watchdog-2.1.6-py3-none-win32.whl", hash = "sha256:e02794ac791662a5eafc6ffeaf9bcc149035a0e48eb0a9d40a8feb4622605a3d"},
{file = "watchdog-2.1.6-py3-none-win_amd64.whl", hash = "sha256:bd9ba4f332cf57b2c1f698be0728c020399ef3040577cde2939f2e045b39c1e5"},
{file = "watchdog-2.1.6-py3-none-win_ia64.whl", hash = "sha256:a0f1c7edf116a12f7245be06120b1852275f9506a7d90227648b250755a03923"},
{file = "watchdog-2.1.6.tar.gz", hash = "sha256:a36e75df6c767cbf46f61a91c70b3ba71811dfa0aca4a324d9407a06a8b7a2e7"},
]
weasyprint = [
{file = "weasyprint-54.1-py3-none-any.whl", hash = "sha256:27c078ded67a43c9a05c349eda01ea327805d48e5c3ca3b704f57eb82bd78592"},
{file = "weasyprint-54.1.tar.gz", hash = "sha256:fa57db862e06bd01c5e7d82dad399b3b9952a39827023c17bee9b1c061ff1bbd"},
]
Run Code Online (Sandbox Code Playgroud)
在诗歌.lock 文件的这个片段中,您可以看到 watchdog==2.1.6 和 weasyprint==54.1 的哈希值。对于 weasyprint,标记的轮子py3-none-any可能是在任何系统中实际下载的轮子。
然而,对于看门狗来说,优美的轮子将取决于您的操作系统和硬件,除了您的 python 版本!
watchdog-2.1.6-py3-none-manylinux2014_x86_64.whlwatchdog-2.1.6-cp38-cp38-macosx_11_0_arm64.whlwatchdog-2.1.6.tar.gz,如果无法实现这一点,可能会导致整个安装失败。watchdog-2.1.6.tar.gz您还可以在 PyPI 网站https://pypi.org/project/watchdog/2.1.6/#files中检查这些哈希值
| 归档时间: |
|
| 查看次数: |
1579 次 |
| 最近记录: |