Need help with manylinux?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

pypa
811 Stars 161 Forks MIT License 816 Commits 31 Opened issues

Description

Python wheels that work on any linux (almost)

Services available

!
?

Need anything else?

Contributors list

manylinux

Email: [email protected]

Archives: https://mail.python.org/mailman/listinfo/wheel-builders

Older archives: https://groups.google.com/forum/#!forum/manylinux-discuss

The goal of the manylinux project is to provide a convenient way to distribute binary Python extensions as wheels on Linux. This effort has produced

PEP 513 
_ (manylinux1),
PEP 571 
_ (manylinux2010),
PEP 599 
_ (manylinux2014) and
PEP 600 
_ (manylinuxxy).

PEP 513 defined

manylinux1_x86_64
and
manylinux1_i686
platform tags and the wheels were built on Centos5. Centos5 reached End of Life (EOL) on March 31st, 2017.

PEP 571 defined

manylinux2010_x86_64
and
manylinux2010_i686
platform tags and the wheels were built on Centos6. Centos6 reached End of Life (EOL) on November 30th, 2020.

PEP 599 defines the following platform tags:

  • manylinux2014_x86_64
  • manylinux2014_i686
  • manylinux2014_aarch64
  • manylinux2014_armv7l
  • manylinux2014_ppc64
  • manylinux2014_ppc64le
  • manylinux2014_s390x

Wheels are built on CentOS 7 which will reach End of Life (EOL) on June 30th, 2024.

PEP 600 has been designed to be "future-proof" and does not enforce specific symbols and a specific distro to build. It only states that a wheel tagged

manylinux_x_y
shall work on any distro based on
glibc>=x.y
. The manylinux project supports
manylinux_2_24
images for
x86_64
,
i686
,
aarch64
,
ppc64le
and
s390x
.

Wheel packages compliant with those tags can be uploaded to

PyPI 
_ (for instance with
twine
_) and can be installed with pip:

+-------------------+------------------+----------------------------+-------------------------------------------+ |

manylinux
tag | Client-side pip | CPython (sources) version | Distribution default pip compatibility | | | version required | embedding a compatible pip | | +===================+==================+============================+===========================================+ |
manylinux_x_y
| pip >= 20.3 | 3.10.0+ | Debian 11+, Fedora 34+, Mageia 8+, | | | | | Photon OS 3.0 with updates, Ubuntu 21.04+ | +-------------------+------------------+----------------------------+-------------------------------------------+ |
manylinux2014
| pip >= 19.3 | 3.7.8+, 3.8.4+, 3.9.0+ | CentOS 7 rh-python38, CentOS 8 python38, | | | | | Fedora 32+, Mageia 8+, openSUSE 15.3+, | | | | | Photon OS 4.0+ (3.0+ with updates), | | | | | Ubuntu 20.04+ | +-------------------+------------------+----------------------------+-------------------------------------------+ |
manylinux2010
| pip >= 19.0 | 3.7.3+, 3.8.0+ | ALT Linux 9+, CentOS 7 rh-python38, | | | | | CentOS 8 python38, Fedora 30+, Mageia 7+, | | | | | openSUSE 15.3+, | | | | | Photon OS 4.0+ (3.0+ with updates), | | | | | Ubuntu 20.04+ | +-------------------+------------------+----------------------------+-------------------------------------------+ |
manylinux1
| pip >= 8.1.0 | 3.5.2+, 3.6.0+ | ALT Linux 8+, Amazon Linux 1+, CentOS 7+, | | | | | Debian 9+, Fedora 25+, openSUSE 15.2+, | | | | | Mageia 7+, Photon OS 1.0+, Ubuntu 16.04+ | +-------------------+------------------+----------------------------+-------------------------------------------+

The various manylinux tags allow projects to distribute wheels that are automatically installed (and work!) on the vast majority of desktop and server Linux distributions.

This repository hosts several manylinux-related things:

Docker images

Building manylinux-compatible wheels is not trivial; as a general rule, binaries built on one Linux distro will only work on other Linux distros that are the same age or newer. Therefore, if we want to make binaries that run on most Linux distros, we have to use an old enough distro.

Rather than forcing you to install an old distro yourself, install Python, etc., we provide

Docker 
_ images where we've done the work for you. The images are uploaded to
quay.io
_ and are tagged for repeatable builds.

manylinux224 (Debian 9 based) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • x8664 image: ``quay.io/pypa/manylinux224x86_64``
  • i686 image:
    quay.io/pypa/manylinux_2_24_i686
  • aarch64 image:
    quay.io/pypa/manylinux_2_24_aarch64
  • ppc64le image:
    quay.io/pypa/manylinux_2_24_ppc64le
  • s390x image:
    quay.io/pypa/manylinux_2_24_s390x

manylinux2014 (CentOS 7 based) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • x8664 image: ``quay.io/pypa/manylinux2014x86_64``
  • i686 image:
    quay.io/pypa/manylinux2014_i686
  • aarch64 image:
    quay.io/pypa/manylinux2014_aarch64
  • ppc64le image:
    quay.io/pypa/manylinux2014_ppc64le
  • s390x image:
    quay.io/pypa/manylinux2014_s390x

manylinux2010 (CentOS 6 based - EOL) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • x86-64 image:
    quay.io/pypa/manylinux2010_x86_64
  • i686 image:
    quay.io/pypa/manylinux2010_i686

manylinux1 (CentOS 5 based - EOL) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Code and details regarding

manylinux1
can be found in the
manylinux1 branch 
_.

Support for

manylinux1
will
end on January 1st, 2022 
_.
  • x86-64 image:
    quay.io/pypa/manylinux1_x86_64
  • i686 image:
    quay.io/pypa/manylinux1_i686

All images are rebuilt using GitHub Actions / Travis-CI on every commit to this repository; see the

docker/ 
_ directory for source code.

Image content ~~~~~~~~~~~~~

All images currently contain:

  • CPython 3.5, 3.6, 3.7, 3.8 and 3.9, installed in

    /opt/python/-
    . The directories are named after the PEP 425 tags for each environment -- e.g.
    /opt/python/cp37-cp37m
    contains a CPython 3.7 build, and can be used to produce wheels named like
    --cp37-cp37m-.whl
    .
  • Development packages for all the libraries that PEP 571/599 list. One should not assume the presence of any other development package.

  • The

    auditwheel 
    _ tool

Note that less common or virtually unheard of flag combinations (such as

--with-pydebug
(
d
) and
--without-pymalloc
(absence of
m
)) are not provided.

Note that

starting with CPython 3.8 
_, default
sys.abiflags
became an empty string: the
m
flag for pymalloc became useless (builds with and without pymalloc are ABI compatible) and so has been removed. (e.g.
/opt/python/cp38-cp38
)

Building Docker images

To build the Docker images, please run the following command from the current (root) directory:

$ PLATFORM=$(uname -m) POLICY=manylinux2014 COMMIT_SHA=latest ./build.sh

Please note that the Docker build is using

buildx 
_.

Example

An example project which builds x8664 wheels for each Python interpreter version can be found here: https://github.com/pypa/python-manylinux-demo. The repository also contains demo to build i686 and x8664 wheels with

manylinux1
tags.

This demonstrates how to use these docker images in conjunction with auditwheel to build manylinux-compatible wheels using the free

travis ci 
_ continuous integration service.

(NB: for the i686 images running on a x8664 host machine, it's necessary to run everything under the command line program

linux32
, which changes reported architecture in new program environment. See
this example invocation
)

The PEP itself

The official version of

PEP 513
_ is stored in the
PEP
repository 
, but we also have our
own copy here
. This is where the PEP was originally written, so if for some reason you really want to see the full history of edits it went through, then this is the place to look.

The proposal to upgrade

manylinux1
to
manylinux2010
after Centos5 reached EOL was discussed in
PEP 571 
_.

The proposal to upgrade

manylinux2010
to
manylinux2014
was discussed in
PEP 599 
_.

The proposal for a "future-proof"

manylinux_x_y
definition was discussed in
PEP 600 
_.

This repo also has some analysis code that was used when putting together the original proposal in the

policy-info/
directory.

If you want to read the full discussion that led to the original policy, then lots of that is here: https://groups.google.com/forum/#!forum/manylinux-discuss

The distutils-sig archives for January 2016 also contain several threads.

Code of Conduct

Everyone interacting in the manylinux project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the

PSF Code of Conduct
_.

.. PSF Code of Conduct: https://github.com/pypa/.github/blob/main/CODEOF_CONDUCT.md .. _

quay.io
: https://quay.io/organization/pypa

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.