两个 linux 发行版中的 python 模块的最新版本不同。为什么?

The latest version of python module in two linux distributions are different. why?

此时此刻,4.7.0 已于 12 小时前发布。 我在 alpine 和 ubuntu 中看到了不同版本的 multidict 列表。为什么我在 alpine 中看不到 4.7.0?

$ docker run -i -t alpine:edge /bin/sh

# apk add py3-pip
# pip3 install multidict==

Collecting multidict== ERROR: Could not find a version that satisfies the requirement multidict== (from versions: 1.0.0a0, 1.0.1, 1.0.2, 1.0.3, 1.1.0b1, 1.1.0b2, 1.1.0b4, 1.1.0b5, 1.1.0b6, 1.1.0b7, 1.1.0b8, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 3.0.0, 3.1.0, 3.1.1, 3.1.3a0, 3.1.3, 3.1.4a1, 3.1.4a2, 3.1.4a3, 3.2.0a3, 3.2.0, 3.2.1a0, 3.3.0, 3.3.1, 3.3.2, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.3.1, 4.4.0a0, 4.4.0a1, 4.4.0a2, 4.4.0a3, 4.4.0a4, 4.4.0a5, 4.4.0a6, 4.4.0a7, 4.4.0a8, 4.4.0a9, 4.4.0a10, 4.4.0a11, 4.4.0a12, 4.4.0a13, 4.4.0a14, 4.4.0a15, 4.4.0a16, 4.4.0a17, 4.4.0a18, 4.4.0a19, 4.4.0a20, 4.4.0a21, 4.4.0a22, 4.4.0a23, 4.4.0a24, 4.4.0a25, 4.4.0a26, 4.4.0a27, 4.4.0a28, 4.4.0a29, 4.4.0a30, 4.4.0a31, 4.4.0a32, 4.4.0a33, 4.4.0a34, 4.4.0a35, 4.4.0a36, 4.4.0a37, 4.4.0a38, 4.4.0a39, 4.4.0a40, 4.4.0a42, 4.4.0, 4.4.1, 4.4.2, 4.5.0, 4.5.1, 4.5.2, 4.6.0a2, 4.6.0a3, 4.6.0, 4.6.1) ERROR: No matching distribution found for multidict==

$ docker run -i -t ubuntu /bin/bash

# apt install python3-pip
# pip3 install multidict==

Collecting multidict== Could not find a version that satisfies the requirement multidict== (from versions: 1.0.0a0, 1.0.1, 1.0.2, 1.0.3, 1.1.0b1, 1.1.0b2, 1.1.0b4, 1.1.0b5, 1.1.0b6, 1.1.0b7, 1.1.0b8, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 3.0.0, 3.1.0, 3.1.1, 3.1.3a0, 3.1.3, 3.1.4a0, 3.1.4a1, 3.1.4a2, 3.1.4a3, 3.2.0a3, 3.2.0, 3.2.1a0, 3.3.0, 3.3.1, 3.3.2, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.3.1, 4.4.0a0, 4.4.0a1, 4.4.0a2, 4.4.0a3, 4.4.0a4, 4.4.0a5, 4.4.0a6, 4.4.0a7, 4.4.0a8, 4.4.0a9, 4.4.0a10, 4.4.0a11, 4.4.0a12, 4.4.0a13, 4.4.0a14, 4.4.0a15, 4.4.0a16, 4.4.0a17, 4.4.0a18, 4.4.0a19, 4.4.0a20, 4.4.0a21, 4.4.0a22, 4.4.0a23, 4.4.0a24, 4.4.0a25, 4.4.0a26, 4.4.0a27, 4.4.0a28, 4.4.0a29, 4.4.0a30, 4.4.0a31, 4.4.0a32, 4.4.0a33, 4.4.0a34, 4.4.0a35, 4.4.0a36, 4.4.0a37, 4.4.0a38, 4.4.0a39, 4.4.0a40, 4.4.0a42, 4.4.0, 4.4.1, 4.4.2, 4.5.0, 4.5.1, 4.5.2, 4.6.0a2, 4.6.0a3, 4.6.0, 4.6.1, 4.7.0) No matching distribution found for multidict==


已更新

目前,您可以看到如下所示。为什么在 alpine 中找不到版本 4.7.0?

高山

Collecting multidict== ERROR: Could not find a version that satisfies the requirement multidict== (from versions: 1.0.0a0, 1.0.1, 1.0.2, 1.0.3, 1.1.0b1, 1.1.0b2, 1.1.0b4, 1.1.0b5, 1.1.0b6, 1.1.0b7, 1.1.0b8, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 3.0.0, 3.1.0, 3.1.1, 3.1.3a0, 3.1.3, 3.1.4a1, 3.1.4a2, 3.1.4a3, 3.2.0a3, 3.2.0, 3.2.1a0, 3.3.0, 3.3.1, 3.3.2, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.3.1, 4.4.0a0, 4.4.0a1, 4.4.0a2, 4.4.0a3, 4.4.0a4, 4.4.0a5, 4.4.0a6, 4.4.0a7, 4.4.0a8, 4.4.0a9, 4.4.0a10, 4.4.0a11, 4.4.0a12, 4.4.0a13, 4.4.0a14, 4.4.0a15, 4.4.0a16, 4.4.0a17, 4.4.0a18, 4.4.0a19, 4.4.0a20, 4.4.0a21, 4.4.0a22, 4.4.0a23, 4.4.0a24, 4.4.0a25, 4.4.0a26, 4.4.0a27, 4.4.0a28, 4.4.0a29, 4.4.0a30, 4.4.0a31, 4.4.0a32, 4.4.0a33, 4.4.0a34, 4.4.0a35, 4.4.0a36, 4.4.0a37, 4.4.0a38, 4.4.0a39, 4.4.0a40, 4.4.0a42, 4.4.0, 4.4.1, 4.4.2, 4.5.0, 4.5.1, 4.5.2, 4.6.0a2, 4.6.0a3, 4.6.0, 4.6.1, 4.7.1) ERROR: No matching distribution found for multidict==

Ubuntu

Collecting multidict== Could not find a version that satisfies the requirement multidict== (from versions: 1.0.0a0, 1.0.1, 1.0.2, 1.0.3, 1.1.0b1, 1.1.0b2, 1.1.0b4, 1.1.0b5, 1.1.0b6, 1.1.0b7, 1.1.0b8, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 3.0.0, 3.1.0, 3.1.1, 3.1.3a0, 3.1.3, 3.1.4a0, 3.1.4a1, 3.1.4a2, 3.1.4a3, 3.2.0a3, 3.2.0, 3.2.1a0, 3.3.0, 3.3.1, 3.3.2, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.3.1, 4.4.0a0, 4.4.0a1, 4.4.0a2, 4.4.0a3, 4.4.0a4, 4.4.0a5, 4.4.0a6, 4.4.0a7, 4.4.0a8, 4.4.0a9, 4.4.0a10, 4.4.0a11, 4.4.0a12, 4.4.0a13, 4.4.0a14, 4.4.0a15, 4.4.0a16, 4.4.0a17, 4.4.0a18, 4.4.0a19, 4.4.0a20, 4.4.0a21, 4.4.0a22, 4.4.0a23, 4.4.0a24, 4.4.0a25, 4.4.0a26, 4.4.0a27, 4.4.0a28, 4.4.0a29, 4.4.0a30, 4.4.0a31, 4.4.0a32, 4.4.0a33, 4.4.0a34, 4.4.0a35, 4.4.0a36, 4.4.0a37, 4.4.0a38, 4.4.0a39, 4.4.0a40, 4.4.0a42, 4.4.0, 4.4.1, 4.4.2, 4.5.0, 4.5.1, 4.5.2, 4.6.0a2, 4.6.0a3, 4.6.0, 4.6.1, 4.7.0, 4.7.1) No matching distribution found for multidict==

可能是因为 4.7.0 版本 PyPI 没有可用的源代码分发。看到list of distributions for multidict 4.7.0. Then compare this to the list of distributions for multidict 4.7.1,这个有一个multidict-4.7.1.tar.gz.

最有可能 Python 的 Python 车轮内置分布 适合 Alpine Linux(关于不同的 libc 的东西,我不确定),所以它会回退到源代码分发。但是当没有源代码分发时,这个特定版本根本无法构建和安装。

参见 "Platform Detection for Installers" section of PEP 513 -- A Platform Tag for Portable Linux Built Distributions:

We know of four main sources of potential incompatibility that are likely to arise in practice:

  • [...]
  • A linux distribution that does not use glibc (e.g. Alpine Linux, which is based on musl libc, or Android)