Warning
Warnings¶
Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL.
What is PIL/Pillow? PIL (Python Imaging Library) adds many image processing features to Python. Pillow is a fork of PIL that adds some user-friendly features. CImage.py is a Python module used for image processing. Installing Python, PIL/Pillow, and cImage.py Windows. Install Python 2.7.8 (64-bit — this is important). Environment variable: MAXCONCURRENCY=n.Pillow can use multiprocessing to build the extension. Setting MAXCONCURRENCY 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. Looking for Python 2.7? See below for specific releases. Python 3.8.3 May 13, 2020 Download Release Notes; Python 2.7.18 April 20, 2020 Download Release Notes; Python 3.7.7 March 10. The same source code archive can also be used to build the Windows and Mac versions, and is the starting point for ports to all other platforms.
Pillow >= 1.0 no longer supports “import Image”. Please use “from PIL import Image” instead.
Pillow >= 2.1.0 no longer supports “import _imaging”. Please use “from PIL.Image import core as _imaging” instead.
Notes¶
Note
Pillow is supported on the following Python versions
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 have all of the optional libraries included exceptfor raqm, libimagequant, and libxcb:
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 and libxcb. Raqm support requireslibraqm, fribidi, and harfbuzz 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 requireslibraqm, fribidi, and harfbuzz to be installed separately:
Most major Linux distributions, including Fedora, Debian/Ubuntu andArchLinux also include Pillow in packages that previously containedPIL e.g.
python-imaging .
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:
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¶
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--install from 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 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:
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 RedHatCentos or Fedora with:
Note that the package manager may be yum or dnf, depending on theexact distribution.
See also the
Dockerfile s 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¶Install Pip 2.7 Mac
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.
Other Platforms¶
These platforms have been reported to work at the versions mentioned.
Note
Contributors please test Pillow on your platform then update thisdocument and send a pull request.
![]()
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/.
Pil Python InstallWarnings¶
Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL.
Pillow >= 1.0 no longer supports “import Image”. Please use “from PIL import Image” instead.
Pillow >= 2.1.0 no longer supports “import _imaging”. Please use “from PIL.Image import core as _imaging” instead.
Notes¶
Note
Pillow < 2.0.0 supports Python versions 2.4, 2.5, 2.6, 2.7.
Note
Pillow >= 2.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3, 3.4
![]() Basic Installation¶
Note
The following instructions will install Pillow with support for most common image formats. See External Libraries for a full list of external libraries supported.
Install Pillow with pip:
Or use easy_install for installing Python Eggs as pip does not support them:
Or download and extract the compressed archive from PyPI and inside it run:
External Libraries¶
Note
You do not need to install all external libraries supported to use Pillow’s basic features.
Many of Pillow’s features require external libraries:
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:
Build Options¶
Sample Usage:
OS X Installation¶
We provide binaries for OS X in the form of Python Wheels. Alternatively you can compile Pillow from soure with XCode.
The easiest way to install external libraries is via Homebrew. After you install Homebrew, run:
Install Pillow with:
Windows Installation¶
We provide binaries for Windows in the form of Python Eggs and Python Wheels:
Python Eggs¶
Note
pip does not support Python Eggs; use easy_installinstead.
Python Wheels¶
Note
Requires setuptools >=0.8 and pip >=1.4.1. Some older versions of pip required the
--use-wheel flag.
If the above does not work, it’s likely because we haven’t uploaded awheel for the latest version of Pillow. In that case, try pinning itto a specific version:
FreeBSD Installation¶
Make sure you have Python’s development libraries installed.:
Or for Python 3:
Prerequisites are installed on FreeBSD 10 with:
Linux Installation¶
Note
Most major Linux distributions, including Fedora, Debian/Ubuntu and ArchLinux include Pillow in packages that previously contained PIL e.g.
python-imaging . Please consider using native operating system packages first to avoid installation problems and/or missing library support later.
We do not provide binaries for Linux. If you didn’t build Python fromsource, make sure you have Python’s development libraries installed. In Debianor Ubuntu:
Or for Python 3:
In Fedora, the command is:
Prerequisites are installed on Ubuntu 12.04 LTS or Raspian Wheezy7.0 with:
Prerequisites are installed on Ubuntu 14.04 LTS with:
Prerequisites are installed on Fedora 20 with:
Download Pil Python 2.7 Machine LearningPlatform Support¶
Current platform support for Pillow. Binary distributions are contributed foreach release on a volunteer basis, but the source should compile and runeverywhere platform support is listed. In general, we aim to support allcurrent versions of Linux, OS X, and Windows. Sql power architect download for mac.
Python 2.7 Pil
Contributors please test Pillow on your platform then update this document and send a pull request.
Old Versions¶Download Pil Python 2.7 Macros
You can download old distributions from PyPI. Only the latest 1.x and 2.x releases are visible, but all releases are available by direct URL access e.g. https://pypi.python.org/pypi/Pillow/1.0.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |