Download Pil Python 2.7

Posted onby

Note: A bugfix release, 2.7.16, is currently available.Its use is recommended. Python 2.7.0 was released on July 3rd, 2010. Python 2.7 is scheduled to be the last major version in the 2.x series before it moves into an extended maintenance period. Download Python 2.7 PIL-1.1.7. What is Python 2.7 PIL-1.1.7? How popular is the Python 2.7 PIL-1.1.7 software and how to download it? We have collected thousands of software titles and know the answer!

Warnings¶

Warning

Download Pil Python 2.7

Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL.

Pil Python Download

Warning

Pillow >= 1.0 no longer supports importImage. Please use fromPILimportImage instead.

Warning

Pillow >= 2.1.0 no longer supports import_imaging. Please use fromPIL.Imageimportcoreas_imaging instead.

Python Support¶

Pillow supports these Python versions.

Python

3.10

3.9

3.8

3.7

3.6

3.5

3.4

2.7

Pillow >= 8.3.2

Yes

Yes

Yes

Yes

Yes

Pillow 8.0 - 8.3.1

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

Python

3.6

3.5

3.4

3.3

3.2

2.7

2.6

2.5

2.4

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

Basic Installation¶

Note

The following instructions will install Pillow with support formost common image formats. See External Libraries for afull list of external libraries supported.

Install Pillow with pip:

Windows Installation¶

We provide Pillow binaries for Windows compiled for the matrix ofsupported Pythons in both 32 and 64-bit versions in the wheel format.These binaries include support for all optional libraries exceptlibimagequant and libxcb. Raqm support requiresFriBiDi to be installed separately:

To install Pillow in MSYS2, see Building on Windows using MSYS2/MinGW.

macOS Installation¶

We provide binaries for macOS for each of the supported Pythonversions in the wheel format. These include support for all optionallibraries except libimagequant. Raqm support requiresFriBiDi to be installed separately:

Linux Installation¶

We provide binaries for Linux for each of the supported Pythonversions in the manylinux wheel format. These include support for alloptional libraries except libimagequant. Raqm support requiresFriBiDi to be installed separately:

Most major Linux distributions, including Fedora, Ubuntu and ArchLinuxalso include Pillow in packages that previously contained PIL e.g.python-imaging. Debian splits it into two packages, python3-piland python3-pil.imagetk.

FreeBSD Installation¶

Pillow can be installed on FreeBSD via the official Ports or Packages systems:

Ports:

Packages:

Note

The Pillow FreeBSD port and packagesare tested by the ports team with all supported FreeBSD versions.

Building From Source¶

Download and extract the compressed archive from PyPI.

External Libraries¶

Note

You do not need to install all supported external libraries touse Pillow’s basic features. Zlib and libjpeg are requiredby default.

Note

There are Dockerfiles in our Docker images repo to install thedependencies for some operating systems.

Many of Pillow’s features require external libraries:

  • libjpeg provides JPEG functionality.

    • Pillow has been tested with libjpeg versions 6b, 8, 9-9d andlibjpeg-turbo version 8.

    • Starting with Pillow 3.0.0, libjpeg is required by default, butmay be disabled with the --disable-jpeg flag.

  • zlib provides access to compressed PNGs

    • Starting with Pillow 3.0.0, zlib is required by default, but maybe disabled with the --disable-zlib flag.

  • libtiff provides compressed TIFF functionality

    • Pillow has been tested with libtiff versions 3.x and 4.0-4.3

  • libfreetype provides type related services

  • littlecms provides color management

    • Pillow version 2.2.1 and below uses liblcms1, Pillow 2.3.0 andabove uses liblcms2. Tested with 1.19 and 2.7-2.12.

  • libwebp provides the WebP format.

    • Pillow has been tested with version 0.1.3, which does not readtransparent WebP files. Versions 0.3.0 and above supporttransparency.

  • tcl/tk provides support for tkinter bitmap and photo images.

  • openjpeg provides JPEG 2000 functionality.

    • Pillow has been tested with openjpeg 2.0.0, 2.1.0, 2.3.1 and 2.4.0.

    • Pillow does not support the earlier 1.5 series which shipswith Debian Jessie.

  • libimagequant provides improved color quantization

    • Pillow has been tested with libimagequant 2.6-2.16.0

    • Libimagequant is licensed GPLv3, which is more restrictive thanthe Pillow license, therefore we will not be distributing binarieswith libimagequant support enabled.

  • libraqm provides complex text layout support.

    • libraqm provides bidirectional text support (using FriBiDi),shaping (using HarfBuzz), and proper script itemization. As aresult, Raqm can support most writing systems covered by Unicode.

    • libraqm depends on the following libraries: FreeType, HarfBuzz,FriBiDi, make sure that you install them before installing libraqmif not available as package in your system.

    • Setting text direction or font features is not supported without libraqm.

    • Pillow wheels since version 8.2.0 include a modified version of libraqm thatloads libfribidi at runtime if it is installed.On Windows this requires compiling FriBiDi and installing fribidi.dllinto a directory listed in the Dynamic-Link Library Search Order (Microsoft Docs)(fribidi-0.dll or libfribidi-0.dll are also detected).See Build Options to see how to build this version.

    • Previous versions of Pillow (5.0.0 to 8.1.2) linked libraqm dynamically at runtime.

  • libxcb provides X11 screengrab support.

Once you have installed the prerequisites, run:

If the prerequisites are installed in the standard library locationsfor your machine (e.g. /usr or /usr/local), noadditional configuration should be required. If they are installed ina non-standard location, you may need to configure setuptools to usethose locations by editing setup.py orsetup.cfg, or by adding environment variables on the commandline:

If Pillow has been previously built without the requiredprerequisites, it may be necessary to manually clear the pip cache orbuild without cache using the --no-cache-dir option to force abuild with newly installed external libraries.

Build Options¶

  • Environment variable: MAX_CONCURRENCY=n. Pillow can usemultiprocessing to build the extension. Setting MAX_CONCURRENCYsets the number of CPUs to use, or can disable parallel building byusing a setting of 1. By default, it uses 4 CPUs, or if 4 are notavailable, as many as are present.

  • Build flags: --disable-zlib, --disable-jpeg,--disable-tiff, --disable-freetype, --disable-lcms,--disable-webp, --disable-webpmux, --disable-jpeg2000,--disable-imagequant, --disable-xcb.Disable building the corresponding feature even if the developmentlibraries are present on the building machine.

  • Build flags: --enable-zlib, --enable-jpeg,--enable-tiff, --enable-freetype, --enable-lcms,--enable-webp, --enable-webpmux, --enable-jpeg2000,--enable-imagequant, --enable-xcb.Require that the corresponding feature is built. The build will raisean exception if the libraries are not found. Webpmux (WebP metadata)relies on WebP support. Tcl and Tk also must be used together.

  • Build flags: --vendor-raqm--vendor-fribidiThese flags are used to compile a modified version of libraqm anda shim that dynamically loads libfribidi at runtime. These areused to compile the standard Pillow wheels. Compiling libraqm requiresa C99-compliant compiler.

  • Build flag: --disable-platform-guessing. Skips all of theplatform dependent guessing of include and library directories forautomated build systems that configure the proper paths in theenvironment variables (e.g. Buildroot).

  • Build flag: --debug. Adds a debugging flag to the include andlibrary search process to dump all paths searched for and found tostdout.

Sample usage:

or using pip:

Building on macOS¶

The Xcode command line tools are required to compile portions ofPillow. The tools are installed by running xcode-select--installfrom the command line. The command line tools are required even if youhave the full Xcode package installed. It may be necessary to runsudoxcodebuild-license to accept the license prior to using thetools.

The easiest way to install external libraries is via Homebrew. After you install Homebrew, run:

To install libraqm on macOS use Homebrew to install its dependencies:

Then see depends/install_raqm_cmake.sh to install libraqm.

Now install Pillow with:

or from within the uncompressed source directory:

Building on Windows¶

We recommend you use prebuilt wheels from PyPI.If you wish to compile Pillow manually, you can use the build scriptsin the winbuild directory used for CI testing and development.These scripts require Visual Studio 2017 or newer and NASM.

Building on Windows using MSYS2/MinGW¶

To build Pillow using MSYS2, make sure you run the MSYS2 MinGW 32-bit orMSYS2 MinGW 64-bit console, notMSYS2 directly.

The following instructions target the 64-bit build, for 32-bitreplace all occurrences of mingw-w64-x86_64- with mingw-w64-i686-.

Make sure you have Python and GCC installed:

Prerequisites are installed on MSYS2 MinGW 64-bit with:

Now install Pillow with:

Building on FreeBSD¶

Make sure you have Python’s development libraries installed:

Prerequisites are installed on FreeBSD 10 or 11 with:

Then see depends/install_raqm_cmake.sh to install libraqm.

Building on Linux¶

If you didn’t build Python from source, make sure you have Python’sdevelopment libraries installed.

In Debian or Ubuntu:

In Fedora, the command is:

In Alpine, the command is:

Note

redhat-rpm-config is required on Fedora 23, but not earlier versions.

Prerequisites for Ubuntu 16.04 LTS - 20.04 LTS are installed with:

Then see depends/install_raqm.sh to install libraqm.

Prerequisites are installed on recent Red Hat, CentOS or Fedora with:

Note that the package manager may be yum or DNF, depending on theexact distribution.

Prerequisites are installed for Alpine with:

See also the Dockerfiles in the Test Infrastructure repo(https://github.com/python-pillow/docker-images) for a known workinginstall process for other tested distros.

Building on Android¶

Basic Android support has been added for compilation within the Termuxenvironment. The dependencies can be installed by:

This has been tested within the Termux app on ChromeOS, on x86.

Platform Support¶

Current platform support for Pillow. Binary distributions arecontributed for each release on a volunteer basis, but the sourceshould compile and run everywhere platform support is listed. Ingeneral, we aim to support all current versions of Linux, macOS, andWindows.

Continuous Integration Targets¶

These platforms are built and tested for every change.

Pil Python Documentation

Operating system

Tested Python versions

Tested architecture

Alpine

3.9

x86-64

Amazon Linux 2

3.7

x86-64

Arch

3.9

x86-64

CentOS 7

3.6

x86-64

CentOS 8

3.6

x86-64

CentOS Stream 8

3.6

x86-64

Debian 10 Buster

3.7

x86

Fedora 33

3.9

x86-64

Fedora 34

3.9

x86-64

macOS 10.15 Catalina

3.6, 3.7, 3.8, 3.9, 3.10, PyPy3

x86-64

Ubuntu Linux 18.04 LTS (Bionic)

3.6

x86-64

Ubuntu Linux 20.04 LTS (Focal)

3.6, 3.7, 3.8, 3.9, 3.10, PyPy3

x86-64

3.8

arm64v8, ppc64le,s390x

Windows Server 2016

3.6

x86-64

Windows Server 2019

3.6, 3.7, 3.8, 3.9, 3.10, PyPy3

x86, x86-64

3.9/MinGW

x86, x86-64

Other Platforms¶

These platforms have been reported to work at the versions mentioned.

Pil

Note

Contributors please test Pillow on your platform then update thisdocument and send a pull request.

Operating system

versions
Pillow version
processors

macOS 11.0 Big Sur

3.7, 3.8, 3.9

8.3.2

arm

3.6, 3.7, 3.8, 3.9

8.3.2

x86-64

macOS 10.15 Catalina

3.6, 3.7, 3.8, 3.9

8.3.2

x86-64

3.5

7.2.0

macOS 10.14 Mojave

3.5, 3.6, 3.7, 3.8

7.2.0

x86-64

2.7

6.0.0

3.4

5.4.1

macOS 10.13 High Sierra

2.7, 3.4, 3.5, 3.6

4.2.1

x86-64

macOS 10.12 Sierra

2.7, 3.4, 3.5, 3.6

4.1.1

x86-64

Mac OS X 10.11 El Capitan

2.7, 3.4, 3.5, 3.6, 3.7

5.4.1

x86-64

3.3

4.1.0

Mac OS X 10.9 Mavericks

2.7, 3.2, 3.3, 3.4

3.0.0

x86-64

Mac OS X 10.8 Mountain Lion

2.6, 2.7, 3.2, 3.3

x86-64

Redhat Linux 6

2.6

x86

CentOS 6.3

2.7, 3.3

x86

Fedora 23

2.7, 3.4

3.1.0

x86-64

Ubuntu Linux 12.04 LTS (Precise)

PyPy5.3.1, PyPy3 v2.4.0

3.4.1

x86,x86-64

2.7

4.3.0

x86-64

2.7, 3.2

3.4.1

ppc

Ubuntu Linux 10.04 LTS (Lucid)

2.6

2.3.0

x86,x86-64

Debian 8.2 Jessie

2.7, 3.4

3.1.0

x86-64

Raspbian Jessie

2.7, 3.4

3.1.0

arm

Raspbian Stretch

2.7, 3.5

4.0.0

arm

Raspberry Pi OS

3.6, 3.7, 3.8, 3.9

8.2.0

arm

2.7

6.2.2

Gentoo Linux

2.7, 3.2

2.1.0

x86-64

FreeBSD 11.1

2.7, 3.4, 3.5, 3.6

4.3.0

x86-64

FreeBSD 10.3

2.7, 3.4, 3.5

4.2.0

x86-64

FreeBSD 10.2

2.7, 3.4

3.1.0

x86-64

Windows 10

3.7

7.1.0

x86-64

Windows 8.1 Pro

2.6, 2.7, 3.2, 3.3, 3.4

2.4.0

x86,x86-64

Windows 8 Pro

2.6, 2.7, 3.2, 3.3, 3.4a3

2.2.0

x86,x86-64

Windows 7 Professional

3.7

7.0.0

x86,x86-64

Windows Server 2008 R2 Enterprise

3.3

x86-64

Old Versions¶

You can download old distributions from the release history at PyPI and by direct URL accesseg. https://pypi.org/project/Pillow/1.0/.