2013-10-09 04:13:06 +04:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
2015-05-08 14:28:50 +03:00
|
|
|
Warnings
|
|
|
|
--------
|
|
|
|
|
2015-04-04 15:11:18 +03:00
|
|
|
.. warning:: Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL.
|
2013-10-15 16:47:10 +04:00
|
|
|
|
|
|
|
.. warning:: Pillow >= 1.0 no longer supports "import Image". Please use "from PIL import Image" instead.
|
|
|
|
|
2015-04-04 15:11:18 +03:00
|
|
|
.. warning:: Pillow >= 2.1.0 no longer supports "import _imaging". Please use "from PIL.Image import core as _imaging" instead.
|
2013-10-15 16:51:15 +04:00
|
|
|
|
2015-05-08 14:28:50 +03:00
|
|
|
Notes
|
|
|
|
-----
|
|
|
|
|
2018-08-03 14:44:21 +03:00
|
|
|
.. note:: Pillow is supported on the following Python versions
|
|
|
|
|
2019-12-07 13:57:57 +03:00
|
|
|
|
2020-07-11 13:18:52 +03:00
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| **Python** |**3.9**|**3.8**|**3.7**|**3.6**|**3.5**|**3.4**|**3.3**|**3.2**|**2.7**|**2.6**|**2.5**|**2.4**|
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow >= 8.0 | Yes | Yes | Yes | Yes | | | | | | | | |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow 7.0 - 7.2 | | Yes | Yes | Yes | Yes | | | | | | | |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow 6.2.1 - 6.2.2 | | Yes | Yes | Yes | Yes | | | | Yes | | | |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow 6.0 - 6.2.0 | | | Yes | Yes | Yes | | | | Yes | | | |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow 5.2 - 5.4 | | | Yes | Yes | Yes | Yes | | | Yes | | | |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow 5.0 - 5.1 | | | | Yes | Yes | Yes | | | Yes | | | |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow 4 | | | | Yes | Yes | Yes | Yes | | Yes | | | |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow 2 - 3 | | | | | Yes | Yes | Yes | Yes | Yes | Yes | | |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
|
|
|
| Pillow < 2 | | | | | | | | | Yes | Yes | Yes | Yes |
|
|
|
|
+----------------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+
|
2015-04-04 15:11:18 +03:00
|
|
|
|
2015-04-04 15:12:15 +03:00
|
|
|
Basic Installation
|
|
|
|
------------------
|
2013-10-09 04:13:06 +04:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
The following instructions will install Pillow with support for
|
|
|
|
most common image formats. See :ref:`external-libraries` for a
|
|
|
|
full list of external libraries supported.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2015-04-04 15:18:45 +03:00
|
|
|
Install Pillow with :command:`pip`::
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2020-03-01 21:03:16 +03:00
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
python3 -m pip install --upgrade Pillow
|
2013-10-09 04:13:06 +04:00
|
|
|
|
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
Windows Installation
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
We provide Pillow binaries for Windows compiled for the matrix of
|
2020-04-01 03:26:03 +03:00
|
|
|
supported Pythons in both 32 and 64-bit versions in the wheel format.
|
|
|
|
These binaries have all of the optional libraries included except
|
|
|
|
for raqm, libimagequant, and libxcb::
|
2015-10-12 18:30:01 +03:00
|
|
|
|
2020-03-01 21:03:16 +03:00
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
python3 -m pip install --upgrade Pillow
|
2015-10-12 18:30:01 +03:00
|
|
|
|
|
|
|
|
2016-09-23 14:12:03 +03:00
|
|
|
macOS Installation
|
2016-10-25 15:23:07 +03:00
|
|
|
^^^^^^^^^^^^^^^^^^
|
2015-10-12 18:30:01 +03:00
|
|
|
|
2017-12-20 22:44:32 +03:00
|
|
|
We provide binaries for macOS for each of the supported Python
|
|
|
|
versions in the wheel format. These include support for all optional
|
2020-04-01 03:26:03 +03:00
|
|
|
libraries except libimagequant and libxcb. Raqm support requires
|
|
|
|
libraqm, fribidi, and harfbuzz to be installed separately::
|
2015-10-12 18:30:01 +03:00
|
|
|
|
2020-03-01 21:03:16 +03:00
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
python3 -m pip install --upgrade Pillow
|
2015-10-12 18:30:01 +03:00
|
|
|
|
|
|
|
Linux Installation
|
|
|
|
^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2017-07-01 12:34:08 +03:00
|
|
|
We provide binaries for Linux for each of the supported Python
|
|
|
|
versions in the manylinux wheel format. These include support for all
|
2017-12-20 22:44:32 +03:00
|
|
|
optional libraries except libimagequant. Raqm support requires
|
|
|
|
libraqm, fribidi, and harfbuzz to be installed separately::
|
2017-07-01 12:34:08 +03:00
|
|
|
|
2020-03-01 21:03:16 +03:00
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
python3 -m pip install --upgrade Pillow
|
2017-07-01 12:34:08 +03:00
|
|
|
|
|
|
|
Most major Linux distributions, including Fedora, Debian/Ubuntu and
|
|
|
|
ArchLinux also include Pillow in packages that previously contained
|
|
|
|
PIL e.g. ``python-imaging``.
|
2015-10-12 18:30:01 +03:00
|
|
|
|
2016-04-01 14:02:17 +03:00
|
|
|
FreeBSD Installation
|
|
|
|
^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
Pillow can be installed on FreeBSD via the official Ports or Packages systems:
|
|
|
|
|
|
|
|
**Ports**::
|
|
|
|
|
2019-12-07 01:26:48 +03:00
|
|
|
cd /usr/ports/graphics/py-pillow && make install clean
|
2016-04-01 14:02:17 +03:00
|
|
|
|
|
|
|
**Packages**::
|
|
|
|
|
2019-12-07 15:28:39 +03:00
|
|
|
pkg install py36-pillow
|
2016-04-03 05:01:02 +03:00
|
|
|
|
2016-04-01 14:02:17 +03:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
The `Pillow FreeBSD port
|
|
|
|
<https://www.freshports.org/graphics/py-pillow/>`_ and packages
|
2019-12-07 14:13:29 +03:00
|
|
|
are tested by the ports team with all supported FreeBSD versions.
|
2016-04-01 14:02:17 +03:00
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
|
|
|
|
Building From Source
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
Download and extract the `compressed archive from PyPI`_.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2018-04-17 17:06:43 +03:00
|
|
|
.. _compressed archive from PyPI: https://pypi.org/project/Pillow/
|
2013-10-09 04:13:06 +04:00
|
|
|
|
|
|
|
.. _external-libraries:
|
|
|
|
|
2015-04-18 01:00:53 +03:00
|
|
|
External Libraries
|
2015-10-12 18:30:01 +03:00
|
|
|
^^^^^^^^^^^^^^^^^^
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2014-07-04 23:17:23 +04:00
|
|
|
.. note::
|
|
|
|
|
2016-04-01 13:53:53 +03:00
|
|
|
You **do not need to install all supported external libraries** to
|
|
|
|
use Pillow's basic features. **Zlib** and **libjpeg** are required
|
|
|
|
by default.
|
2015-10-12 18:30:01 +03:00
|
|
|
|
|
|
|
.. note::
|
2016-02-02 16:08:09 +03:00
|
|
|
|
2019-10-12 14:16:10 +03:00
|
|
|
There are Dockerfiles in our `Docker images repo
|
|
|
|
<https://github.com/python-pillow/docker-images>`_ to install the
|
|
|
|
dependencies for some operating systems.
|
2014-07-04 23:17:23 +04:00
|
|
|
|
2013-10-09 04:13:06 +04:00
|
|
|
Many of Pillow's features require external libraries:
|
|
|
|
|
|
|
|
* **libjpeg** provides JPEG functionality.
|
|
|
|
|
2020-01-12 14:43:39 +03:00
|
|
|
* Pillow has been tested with libjpeg versions **6b**, **8**, **9-9d** and
|
2018-08-04 06:28:12 +03:00
|
|
|
libjpeg-turbo version **8**.
|
2015-09-22 23:38:17 +03:00
|
|
|
* Starting with Pillow 3.0.0, libjpeg is required by default, but
|
2015-10-02 12:09:13 +03:00
|
|
|
may be disabled with the ``--disable-jpeg`` flag.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
|
|
|
* **zlib** provides access to compressed PNGs
|
|
|
|
|
2015-09-22 23:38:17 +03:00
|
|
|
* Starting with Pillow 3.0.0, zlib is required by default, but may
|
2015-10-02 12:09:13 +03:00
|
|
|
be disabled with the ``--disable-zlib`` flag.
|
2015-09-22 23:38:17 +03:00
|
|
|
|
2014-11-19 23:14:57 +03:00
|
|
|
* **libtiff** provides compressed TIFF functionality
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2020-01-13 13:06:32 +03:00
|
|
|
* Pillow has been tested with libtiff versions **3.x** and **4.0-4.1**
|
2013-10-09 04:13:06 +04:00
|
|
|
|
|
|
|
* **libfreetype** provides type related services
|
|
|
|
|
|
|
|
* **littlecms** provides color management
|
|
|
|
|
2013-11-30 22:06:21 +04:00
|
|
|
* Pillow version 2.2.1 and below uses liblcms1, Pillow 2.3.0 and
|
2020-06-17 00:54:00 +03:00
|
|
|
above uses liblcms2. Tested with **1.19** and **2.7-2.11**.
|
2013-11-30 22:06:21 +04:00
|
|
|
|
2014-10-29 21:09:00 +03:00
|
|
|
* **libwebp** provides the WebP format.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2013-11-30 22:06:21 +04:00
|
|
|
* Pillow has been tested with version **0.1.3**, which does not read
|
2015-12-25 16:26:14 +03:00
|
|
|
transparent WebP files. Versions **0.3.0** and above support
|
2014-06-02 02:57:25 +04:00
|
|
|
transparency.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2014-06-02 02:57:25 +04:00
|
|
|
* **tcl/tk** provides support for tkinter bitmap and photo images.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2014-06-02 02:57:25 +04:00
|
|
|
* **openjpeg** provides JPEG 2000 functionality.
|
2014-04-01 21:52:52 +04:00
|
|
|
|
2019-04-08 13:37:28 +03:00
|
|
|
* Pillow has been tested with openjpeg **2.0.0**, **2.1.0** and **2.3.1**.
|
2015-10-10 23:21:53 +03:00
|
|
|
* Pillow does **not** support the earlier **1.5** series which ships
|
2019-04-01 16:34:18 +03:00
|
|
|
with Debian Jessie.
|
2014-04-01 21:52:52 +04:00
|
|
|
|
2016-05-26 23:55:36 +03:00
|
|
|
* **libimagequant** provides improved color quantization
|
2016-07-06 14:54:50 +03:00
|
|
|
|
2019-12-31 00:43:20 +03:00
|
|
|
* Pillow has been tested with libimagequant **2.6-2.12.6**
|
2016-06-15 13:55:40 +03:00
|
|
|
* Libimagequant is licensed GPLv3, which is more restrictive than
|
2016-05-26 23:55:36 +03:00
|
|
|
the Pillow license, therefore we will not be distributing binaries
|
|
|
|
with libimagequant support enabled.
|
|
|
|
|
2016-12-15 13:43:02 +03:00
|
|
|
* **libraqm** provides complex text layout support.
|
|
|
|
|
|
|
|
* libraqm provides bidirectional text support (using FriBiDi),
|
|
|
|
shaping (using HarfBuzz), and proper script itemization. As a
|
|
|
|
result, Raqm can support most writing systems covered by Unicode.
|
|
|
|
* libraqm depends on the following libraries: FreeType, HarfBuzz,
|
2018-08-23 14:15:16 +03:00
|
|
|
FriBiDi, make sure that you install them before installing libraqm
|
2017-07-01 14:14:41 +03:00
|
|
|
if not available as package in your system.
|
2017-07-01 12:34:08 +03:00
|
|
|
* setting text direction or font features is not supported without
|
|
|
|
libraqm.
|
2017-12-30 21:34:55 +03:00
|
|
|
* libraqm is dynamically loaded in Pillow 5.0.0 and above, so support
|
2018-04-14 15:16:46 +03:00
|
|
|
is available if all the libraries are installed.
|
2019-12-10 00:48:57 +03:00
|
|
|
* Windows support: Raqm is not included in prebuilt wheels
|
2016-12-15 13:43:02 +03:00
|
|
|
|
2020-04-01 03:26:03 +03:00
|
|
|
* **libxcb** provides X11 screengrab support.
|
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
Once you have installed the prerequisites, run::
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2020-03-01 21:03:16 +03:00
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
python3 -m pip install --upgrade Pillow
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2014-07-05 22:50:37 +04:00
|
|
|
If the prerequisites are installed in the standard library locations
|
|
|
|
for your machine (e.g. :file:`/usr` or :file:`/usr/local`), no
|
|
|
|
additional configuration should be required. If they are installed in
|
|
|
|
a non-standard location, you may need to configure setuptools to use
|
|
|
|
those locations by editing :file:`setup.py` or
|
|
|
|
:file:`setup.cfg`, or by adding environment variables on the command
|
|
|
|
line::
|
|
|
|
|
2020-03-01 21:03:16 +03:00
|
|
|
CFLAGS="-I/usr/pkg/include" python3 -m pip install --upgrade Pillow
|
2014-07-05 22:50:37 +04:00
|
|
|
|
2015-10-14 11:25:20 +03:00
|
|
|
If Pillow has been previously built without the required
|
2015-10-12 18:30:01 +03:00
|
|
|
prerequisites, it may be necessary to manually clear the pip cache or
|
|
|
|
build without cache using the ``--no-cache-dir`` option to force a
|
|
|
|
build with newly installed external libraries.
|
|
|
|
|
|
|
|
|
2014-11-19 23:14:57 +03:00
|
|
|
Build Options
|
2015-10-12 18:30:01 +03:00
|
|
|
^^^^^^^^^^^^^
|
2014-11-19 23:14:57 +03:00
|
|
|
|
2019-08-05 13:32:01 +03:00
|
|
|
* Environment variable: ``MAX_CONCURRENCY=n``. Pillow can use
|
|
|
|
multiprocessing to build the extension. Setting ``MAX_CONCURRENCY``
|
|
|
|
sets the number of CPUs to use, or can disable parallel building by
|
|
|
|
using a setting of 1. By default, it uses 4 CPUs, or if 4 are not
|
|
|
|
available, as many as are present.
|
2014-11-19 23:14:57 +03:00
|
|
|
|
|
|
|
* Build flags: ``--disable-zlib``, ``--disable-jpeg``,
|
2018-08-03 16:41:14 +03:00
|
|
|
``--disable-tiff``, ``--disable-freetype``, ``--disable-lcms``,
|
|
|
|
``--disable-webp``, ``--disable-webpmux``, ``--disable-jpeg2000``,
|
2020-04-01 03:26:03 +03:00
|
|
|
``--disable-imagequant``, ``--disable-xcb``.
|
2016-05-06 20:26:41 +03:00
|
|
|
Disable building the corresponding feature even if the development
|
|
|
|
libraries are present on the building machine.
|
2014-11-19 23:14:57 +03:00
|
|
|
|
|
|
|
* Build flags: ``--enable-zlib``, ``--enable-jpeg``,
|
2018-08-03 16:41:14 +03:00
|
|
|
``--enable-tiff``, ``--enable-freetype``, ``--enable-lcms``,
|
|
|
|
``--enable-webp``, ``--enable-webpmux``, ``--enable-jpeg2000``,
|
2020-04-01 03:26:03 +03:00
|
|
|
``--enable-imagequant``, ``--enable-xcb``.
|
2016-05-06 20:26:41 +03:00
|
|
|
Require that the corresponding feature is built. The build will raise
|
|
|
|
an exception if the libraries are not found. Webpmux (WebP metadata)
|
|
|
|
relies on WebP support. Tcl and Tk also must be used together.
|
2014-11-19 23:14:57 +03:00
|
|
|
|
2016-05-01 13:03:44 +03:00
|
|
|
* Build flag: ``--disable-platform-guessing``. Skips all of the
|
|
|
|
platform dependent guessing of include and library directories for
|
|
|
|
automated build systems that configure the proper paths in the
|
|
|
|
environment variables (e.g. Buildroot).
|
|
|
|
|
|
|
|
* Build flag: ``--debug``. Adds a debugging flag to the include and
|
2016-04-09 18:15:24 +03:00
|
|
|
library search process to dump all paths searched for and found to
|
|
|
|
stdout.
|
|
|
|
|
|
|
|
|
2017-01-03 16:13:45 +03:00
|
|
|
Sample usage::
|
2014-11-19 23:14:57 +03:00
|
|
|
|
2020-03-17 23:54:54 +03:00
|
|
|
MAX_CONCURRENCY=1 python3 setup.py build_ext --enable-[feature] install
|
2014-11-19 23:14:57 +03:00
|
|
|
|
2015-12-28 15:56:38 +03:00
|
|
|
or using pip::
|
|
|
|
|
2020-03-01 21:03:16 +03:00
|
|
|
python3 -m pip install --upgrade Pillow --global-option="build_ext" --global-option="--enable-[feature]"
|
2015-12-28 15:56:38 +03:00
|
|
|
|
|
|
|
|
2016-09-23 14:12:03 +03:00
|
|
|
Building on macOS
|
2016-10-25 15:23:07 +03:00
|
|
|
^^^^^^^^^^^^^^^^^
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2016-06-30 15:38:59 +03:00
|
|
|
The Xcode command line tools are required to compile portions of
|
2016-07-01 14:17:51 +03:00
|
|
|
Pillow. The tools are installed by running ``xcode-select --install``
|
2016-06-30 15:38:59 +03:00
|
|
|
from the command line. The command line tools are required even if you
|
|
|
|
have the full Xcode package installed. It may be necessary to run
|
|
|
|
``sudo xcodebuild -license`` to accept the license prior to using the
|
|
|
|
tools.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
The easiest way to install external libraries is via `Homebrew
|
2017-02-14 12:27:02 +03:00
|
|
|
<https://brew.sh/>`_. After you install Homebrew, run::
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2019-11-19 15:47:15 +03:00
|
|
|
brew install libtiff libjpeg webp little-cms2
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2017-07-01 14:16:49 +03:00
|
|
|
To install libraqm on macOS use Homebrew to install its dependencies::
|
2017-09-02 04:21:12 +03:00
|
|
|
|
2019-11-19 15:47:15 +03:00
|
|
|
brew install freetype harfbuzz fribidi
|
2016-12-15 13:43:02 +03:00
|
|
|
|
2017-07-01 12:34:08 +03:00
|
|
|
Then see ``depends/install_raqm_cmake.sh`` to install libraqm.
|
2016-12-15 13:43:02 +03:00
|
|
|
|
|
|
|
Now install Pillow with::
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2020-03-01 21:03:16 +03:00
|
|
|
python3 -m pip install --upgrade pip
|
|
|
|
python3 -m pip install --upgrade Pillow
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
or from within the uncompressed source directory::
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2020-03-17 23:54:54 +03:00
|
|
|
python3 setup.py install
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
Building on Windows
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
2014-03-22 03:19:51 +04:00
|
|
|
|
2020-05-09 04:16:04 +03:00
|
|
|
We recommend you use prebuilt wheels from PyPI.
|
|
|
|
If you wish to compile Pillow manually, you can use the build scripts
|
|
|
|
in the ``winbuild`` directory used for CI testing and development.
|
|
|
|
These scripts require Visual Studio 2017 or newer and NASM.
|
2014-03-22 03:19:51 +04:00
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
Building on FreeBSD
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
2014-06-02 02:57:25 +04:00
|
|
|
|
2017-05-27 16:25:07 +03:00
|
|
|
.. Note:: Only FreeBSD 10 and 11 tested
|
2014-06-02 02:57:25 +04:00
|
|
|
|
2019-11-19 15:47:15 +03:00
|
|
|
Make sure you have Python's development libraries installed::
|
2014-06-02 02:57:25 +04:00
|
|
|
|
2019-11-19 15:47:15 +03:00
|
|
|
sudo pkg install python3
|
2014-06-02 02:57:25 +04:00
|
|
|
|
2017-05-27 16:25:07 +03:00
|
|
|
Prerequisites are installed on **FreeBSD 10 or 11** with::
|
2014-06-02 02:57:25 +04:00
|
|
|
|
2020-04-01 03:26:03 +03:00
|
|
|
sudo pkg install jpeg-turbo tiff webp lcms2 freetype2 openjpeg harfbuzz fribidi libxcb
|
2014-06-02 02:57:25 +04:00
|
|
|
|
2017-07-01 12:34:08 +03:00
|
|
|
Then see ``depends/install_raqm_cmake.sh`` to install libraqm.
|
|
|
|
|
2015-04-04 15:26:34 +03:00
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
Building on Linux
|
|
|
|
^^^^^^^^^^^^^^^^^
|
2015-04-04 15:26:34 +03:00
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
If you didn't build Python from source, make sure you have Python's
|
2016-09-03 05:19:04 +03:00
|
|
|
development libraries installed.
|
2016-08-15 05:42:47 +03:00
|
|
|
|
|
|
|
In Debian or Ubuntu::
|
2015-04-04 15:26:34 +03:00
|
|
|
|
2019-11-19 15:47:15 +03:00
|
|
|
sudo apt-get install python3-dev python3-setuptools
|
2015-04-04 15:26:34 +03:00
|
|
|
|
|
|
|
In Fedora, the command is::
|
|
|
|
|
2019-11-19 15:47:15 +03:00
|
|
|
sudo dnf install python3-devel redhat-rpm-config
|
2016-04-01 13:53:53 +03:00
|
|
|
|
2016-04-03 05:01:02 +03:00
|
|
|
.. Note:: ``redhat-rpm-config`` is required on Fedora 23, but not earlier versions.
|
2015-04-04 15:26:34 +03:00
|
|
|
|
2020-05-11 11:26:49 +03:00
|
|
|
Prerequisites for **Ubuntu 16.04 LTS - 20.04 LTS** are installed with::
|
2015-04-04 15:26:34 +03:00
|
|
|
|
2019-11-19 15:47:15 +03:00
|
|
|
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
|
2019-12-21 16:48:00 +03:00
|
|
|
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
|
2020-04-01 03:26:03 +03:00
|
|
|
libharfbuzz-dev libfribidi-dev libxcb1-dev
|
2017-07-01 12:34:08 +03:00
|
|
|
|
|
|
|
Then see ``depends/install_raqm.sh`` to install libraqm.
|
2015-04-04 15:26:34 +03:00
|
|
|
|
2018-01-01 17:38:38 +03:00
|
|
|
Prerequisites are installed on recent **RedHat** **Centos** or **Fedora** with::
|
2015-04-04 15:26:34 +03:00
|
|
|
|
2019-11-19 15:47:15 +03:00
|
|
|
sudo dnf install libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel \
|
2019-07-20 12:30:28 +03:00
|
|
|
freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \
|
2020-04-01 03:26:03 +03:00
|
|
|
harfbuzz-devel fribidi-devel libraqm-devel libimagequant-devel libxcb-devel
|
2018-01-01 17:38:38 +03:00
|
|
|
|
|
|
|
Note that the package manager may be yum or dnf, depending on the
|
|
|
|
exact distribution.
|
2015-04-04 15:26:34 +03:00
|
|
|
|
2017-09-20 13:49:47 +03:00
|
|
|
See also the ``Dockerfile``\s in the Test Infrastructure repo
|
2017-09-20 13:08:53 +03:00
|
|
|
(https://github.com/python-pillow/docker-images) for a known working
|
|
|
|
install process for other tested distros.
|
|
|
|
|
|
|
|
Building on Android
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
Basic Android support has been added for compilation within the Termux
|
|
|
|
environment. The dependencies can be installed by::
|
2017-10-02 12:47:25 +03:00
|
|
|
|
2019-12-17 12:08:14 +03:00
|
|
|
pkg install -y python ndk-sysroot clang make \
|
2019-11-29 23:52:31 +03:00
|
|
|
libjpeg-turbo
|
2017-09-20 13:08:53 +03:00
|
|
|
|
|
|
|
This has been tested within the Termux app on ChromeOS, on x86.
|
2014-06-02 02:57:25 +04:00
|
|
|
|
2014-03-22 03:19:51 +04:00
|
|
|
|
2015-04-18 01:00:53 +03:00
|
|
|
Platform Support
|
2013-10-09 04:13:06 +04:00
|
|
|
----------------
|
|
|
|
|
2017-04-03 23:54:37 +03:00
|
|
|
Current platform support for Pillow. Binary distributions are
|
|
|
|
contributed for each release on a volunteer basis, but the source
|
|
|
|
should compile and run everywhere platform support is listed. In
|
|
|
|
general, we aim to support all current versions of Linux, macOS, and
|
2017-09-20 13:08:53 +03:00
|
|
|
Windows.
|
2017-04-03 23:54:37 +03:00
|
|
|
|
|
|
|
Continuous Integration Targets
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
These platforms are built and tested for every change.
|
|
|
|
|
2019-11-22 08:39:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
|
|
|
|**Operating system** |**Tested Python versions**|**Tested architecture**|
|
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-03-16 13:38:26 +03:00
|
|
|
| Alpine | 3.8 |x86-64 |
|
2019-11-22 08:39:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-03-16 13:38:26 +03:00
|
|
|
| Arch | 3.8 |x86-64 |
|
2019-11-22 08:39:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
|
|
|
| Amazon Linux 1 | 3.6 |x86-64 |
|
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-03-16 13:38:26 +03:00
|
|
|
| Amazon Linux 2 | 3.7 |x86-64 |
|
2019-11-22 08:39:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
|
|
|
| CentOS 6 | 3.6 |x86-64 |
|
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
|
|
|
| CentOS 7 | 3.6 |x86-64 |
|
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2019-12-26 10:48:18 +03:00
|
|
|
| CentOS 8 | 3.6 |x86-64 |
|
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2019-11-22 08:39:38 +03:00
|
|
|
| Debian 10 Buster | 3.7 |x86 |
|
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
|
|
|
| Fedora 31 | 3.7 |x86-64 |
|
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-04-29 16:03:42 +03:00
|
|
|
| Fedora 32 | 3.8 |x86-64 |
|
2019-11-22 08:39:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-07-12 08:03:10 +03:00
|
|
|
| macOS 10.15 Catalina | 3.6, 3.7, 3.8, PyPy3 |x86-64 |
|
2019-11-22 08:39:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-07-16 13:31:07 +03:00
|
|
|
| Ubuntu Linux 16.04 LTS (Xenial) | 3.6, 3.7, 3.8, PyPy3 |x86-64 |
|
2019-11-22 08:39:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-07-16 14:50:43 +03:00
|
|
|
| Ubuntu Linux 18.04 LTS (Bionic) | 3.6, 3.7, 3.8, PyPy3 |x86-64 |
|
2020-04-26 07:01:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-07-16 13:33:17 +03:00
|
|
|
| Ubuntu Linux 20.04 LTS (Focal) | 3.8 |x86-64 |
|
2020-04-26 07:01:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-03-30 12:02:44 +03:00
|
|
|
| Windows Server 2016 | 3.8 |x86 |
|
2019-11-22 08:39:38 +03:00
|
|
|
| +--------------------------+-----------------------+
|
2020-07-12 08:03:10 +03:00
|
|
|
| | 3.6 |x86-64 |
|
2020-03-30 12:02:44 +03:00
|
|
|
| +--------------------------+-----------------------+
|
|
|
|
| | 3.7/MinGW |x86 |
|
2019-11-22 08:39:38 +03:00
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2020-07-12 08:03:10 +03:00
|
|
|
| Windows Server 2019 | 3.6, 3.7, 3.8 |x86, x86-64 |
|
2019-12-10 00:48:57 +03:00
|
|
|
| +--------------------------+-----------------------+
|
|
|
|
| | PyPy3 |x86 |
|
|
|
|
+----------------------------------+--------------------------+-----------------------+
|
2019-11-22 08:39:38 +03:00
|
|
|
|
2017-04-03 23:54:37 +03:00
|
|
|
|
|
|
|
Other Platforms
|
|
|
|
^^^^^^^^^^^^^^^
|
|
|
|
|
2017-04-28 12:26:49 +03:00
|
|
|
These platforms have been reported to work at the versions mentioned.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
2015-10-12 18:30:01 +03:00
|
|
|
Contributors please test Pillow on your platform then update this
|
|
|
|
document and send a pull request.
|
2013-10-09 04:13:06 +04:00
|
|
|
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
|
|
|
|**Operating system** |**Tested Python versions** |**Latest tested Pillow version**|**Tested processors** |
|
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2020-07-18 13:11:00 +03:00
|
|
|
| macOS 10.15 Catalina | 3.5, 3.6, 3.7, 3.8 | 7.2.0 |x86-64 |
|
2020-02-07 11:03:35 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2020-07-18 17:08:25 +03:00
|
|
|
| macOS 10.14 Mojave | 3.5, 3.6, 3.7, 3.8 | 7.2.0 |x86-64 |
|
|
|
|
| +------------------------------+--------------------------------+ +
|
|
|
|
| | 2.7 | 6.0.0 | |
|
2019-05-24 12:54:57 +03:00
|
|
|
| +------------------------------+--------------------------------+ +
|
|
|
|
| | 3.4 | 5.4.1 | |
|
2018-10-05 14:40:20 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-10-02 12:47:25 +03:00
|
|
|
| macOS 10.13 High Sierra | 2.7, 3.4, 3.5, 3.6 | 4.2.1 |x86-64 |
|
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| macOS 10.12 Sierra | 2.7, 3.4, 3.5, 3.6 | 4.1.1 |x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2019-01-24 11:51:43 +03:00
|
|
|
| Mac OS X 10.11 El Capitan | 2.7, 3.4, 3.5, 3.6, 3.7 | 5.4.1 |x86-64 |
|
2018-10-30 22:16:33 +03:00
|
|
|
| +------------------------------+--------------------------------+ +
|
|
|
|
| | 3.3 | 4.1.0 | |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| Mac OS X 10.9 Mavericks | 2.7, 3.2, 3.3, 3.4 | 3.0.0 |x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| Mac OS X 10.8 Mountain Lion | 2.6, 2.7, 3.2, 3.3 | |x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
|
|
|
| Redhat Linux 6 | 2.6 | |x86 |
|
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| CentOS 6.3 | 2.7, 3.3 | |x86 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| Fedora 23 | 2.7, 3.4 | 3.1.0 |x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2020-07-16 13:33:17 +03:00
|
|
|
| Ubuntu Linux 12.04 LTS (Precise) | 2.6, 3.2, 3.3, 3.4, 3.5 | 3.4.1 |x86,x86-64 |
|
2017-09-24 00:23:19 +03:00
|
|
|
| | PyPy5.3.1, PyPy3 v2.4.0 | | |
|
2018-03-02 20:30:24 +03:00
|
|
|
| +------------------------------+--------------------------------+-----------------------+
|
2017-11-13 16:03:05 +03:00
|
|
|
| | 2.7 | 4.3.0 |x86-64 |
|
2018-03-02 20:30:24 +03:00
|
|
|
| +------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| | 2.7, 3.2 | 3.4.1 |ppc |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2020-07-16 13:33:17 +03:00
|
|
|
| Ubuntu Linux 10.04 LTS (Lucid) | 2.6 | 2.3.0 |x86,x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| Debian 8.2 Jessie | 2.7, 3.4 | 3.1.0 |x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2018-05-29 16:47:20 +03:00
|
|
|
| Raspbian Jessie | 2.7, 3.4 | 3.1.0 |arm |
|
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
|
|
|
| Raspbian Stretch | 2.7, 3.5 | 4.0.0 |arm |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| Gentoo Linux | 2.7, 3.2 | 2.1.0 |x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-12-20 22:13:44 +03:00
|
|
|
| FreeBSD 11.1 | 2.7, 3.4, 3.5, 3.6 | 4.3.0 |x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| FreeBSD 10.3 | 2.7, 3.4, 3.5 | 4.2.0 |x86-64 |
|
2017-05-27 16:25:07 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| FreeBSD 10.2 | 2.7, 3.4 | 3.1.0 |x86-64 |
|
2017-05-27 16:25:07 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2020-03-30 12:02:44 +03:00
|
|
|
| Windows 10 | 3.7 | 7.1.0 |x86-64 |
|
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| Windows 8.1 Pro | 2.6, 2.7, 3.2, 3.3, 3.4 | 2.4.0 |x86,x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2017-09-24 00:23:19 +03:00
|
|
|
| Windows 8 Pro | 2.6, 2.7, 3.2, 3.3, 3.4a3 | 2.2.0 |x86,x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2020-03-30 12:02:44 +03:00
|
|
|
| Windows 7 Professional | 3.7 | 7.0.0 |x86,x86-64 |
|
2017-04-03 23:54:37 +03:00
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
|
|
|
| Windows Server 2008 R2 Enterprise| 3.3 | |x86-64 |
|
|
|
|
+----------------------------------+------------------------------+--------------------------------+-----------------------+
|
2014-07-03 15:33:26 +04:00
|
|
|
|
|
|
|
Old Versions
|
|
|
|
------------
|
|
|
|
|
2019-01-13 21:58:22 +03:00
|
|
|
You can download old distributions from the `release history at PyPI
|
|
|
|
<https://pypi.org/project/Pillow/#history>`_ and by direct URL access
|
|
|
|
eg. https://pypi.org/project/Pillow/1.0/.
|