<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Installation — Pillow v2.6.2 (PIL fork)</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '2.6.2', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="author" title="About these documents" href="about.html" /> <link rel="top" title="Pillow v2.6.2 (PIL fork)" href="index.html" /> <link rel="next" title="About Pillow" href="about.html" /> <link rel="prev" title="Pillow" href="index.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="about.html" title="About Pillow" accesskey="N">next</a> |</li> <li class="right" > <a href="index.html" title="Pillow" accesskey="P">previous</a> |</li> <li><a href="index.html">Home</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="installation"> <h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Pillow >= 2.1.0 no longer supports “import _imaging”. Please use “from PIL.Image import core as _imaging” instead.</p> </div> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">Pillow >= 1.0 no longer supports “import Image”. Please use “from PIL import Image” instead.</p> </div> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">PIL and Pillow currently cannot co-exist in the same environment. If you want to use Pillow, please remove PIL first.</p> </div> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Pillow >= 2.0.0 supports Python versions 2.6, 2.7, 3.2, 3.3, 3.4</p> </div> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Pillow < 2.0.0 supports Python versions 2.4, 2.5, 2.6, 2.7.</p> </div> <div class="section" id="simple-installation"> <h2>Simple installation<a class="headerlink" href="#simple-installation" title="Permalink to this headline">¶</a></h2> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">The following instructions will install Pillow with support for most formats. See <a class="reference internal" href="#external-libraries"><em>External libraries</em></a> for the features you would gain by installing the external libraries first. This page probably also include specific instructions for your platform.</p> </div> <p>You can install Pillow with <strong class="command">pip</strong>:</p> <div class="highlight-python"><pre>$ pip install Pillow</pre> </div> <p>Or <strong class="command">easy_install</strong> (for installing <a class="reference external" href="http://peak.telecommunity.com/DevCenter/PythonEggs">Python Eggs</a>, as <strong class="command">pip</strong> does not support them):</p> <div class="highlight-python"><pre>$ easy_install Pillow</pre> </div> <p>Or download the <a class="reference external" href="https://pypi.python.org/pypi/Pillow">compressed archive from PyPI</a>, extract it, and inside it run:</p> <div class="highlight-python"><pre>$ python setup.py install</pre> </div> </div> <div class="section" id="external-libraries"> <span id="id1"></span><h2>External libraries<a class="headerlink" href="#external-libraries" title="Permalink to this headline">¶</a></h2> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">You <em>do not</em> need to install all of the external libraries to use Pillow’s basic features.</p> </div> <p>Many of Pillow’s features require external libraries:</p> <ul class="simple"> <li><strong>libjpeg</strong> provides JPEG functionality.<ul> <li>Pillow has been tested with libjpeg versions <strong>6b</strong>, <strong>8</strong>, and <strong>9</strong></li> </ul> </li> <li><strong>zlib</strong> provides access to compressed PNGs</li> <li><strong>libtiff</strong> provides group4 tiff functionality<ul> <li>Pillow has been tested with libtiff versions <strong>3.x</strong> and <strong>4.0</strong></li> </ul> </li> <li><strong>libfreetype</strong> provides type related services</li> <li><strong>littlecms</strong> provides color management<ul> <li>Pillow version 2.2.1 and below uses liblcms1, Pillow 2.3.0 and above uses liblcms2. Tested with <strong>1.19</strong> and <strong>2.2</strong>.</li> </ul> </li> <li><strong>libwebp</strong> provides the Webp format.<ul> <li>Pillow has been tested with version <strong>0.1.3</strong>, which does not read transparent webp files. Versions <strong>0.3.0</strong> and <strong>0.4.0</strong> support transparency.</li> </ul> </li> <li><strong>tcl/tk</strong> provides support for tkinter bitmap and photo images.</li> <li><strong>openjpeg</strong> provides JPEG 2000 functionality.<ul> <li>Pillow has been tested with openjpeg <strong>2.0.0</strong> and <strong>2.1.0</strong>.</li> </ul> </li> </ul> <p>Once you have installed the prerequisites,run:</p> <div class="highlight-python"><pre>$ pip install Pillow</pre> </div> <p>If the prerequisites are installed in the standard library locations for your machine (e.g. <tt class="file docutils literal"><span class="pre">/usr</span></tt> or <tt class="file docutils literal"><span class="pre">/usr/local</span></tt>), 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 <tt class="file docutils literal"><span class="pre">setup.py</span></tt> or <tt class="file docutils literal"><span class="pre">setup.cfg</span></tt>, or by adding environment variables on the command line:</p> <div class="highlight-python"><pre>$ CFLAGS="-I/usr/pkg/include" pip install pillow</pre> </div> </div> <div class="section" id="linux-installation"> <h2>Linux installation<a class="headerlink" href="#linux-installation" title="Permalink to this headline">¶</a></h2> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Fedora, Debian/Ubuntu, and ArchLinux include Pillow (instead of PIL) with their distributions. Consider using those instead of installing manually.</p> </div> <p><strong>We do not provide binaries for Linux.</strong> If you didn’t build Python from source, make sure you have Python’s development libraries installed. In Debian or Ubuntu:</p> <div class="highlight-python"><pre>$ sudo apt-get install python-dev python-setuptools</pre> </div> <p>Or for Python 3:</p> <div class="highlight-python"><pre>$ sudo apt-get install python3-dev python3-setuptools</pre> </div> <p>In Fedora, the command is:</p> <div class="highlight-python"><pre>$ sudo yum install python-devel</pre> </div> <p>Prerequisites are installed on <strong>Ubuntu 10.04 LTS</strong> with:</p> <div class="highlight-python"><pre>$ sudo apt-get install libtiff4-dev libjpeg62-dev zlib1g-dev \ libfreetype6-dev tcl8.5-dev tk8.5-dev python-tk</pre> </div> <p>Prerequisites are installed with on <strong>Ubuntu 12.04 LTS</strong> or <strong>Raspian Wheezy 7.0</strong> with:</p> <div class="highlight-python"><pre>$ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev \ libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk</pre> </div> <p>Prerequisites are installed on <strong>Fedora 20</strong> with:</p> <div class="highlight-python"><pre>$ sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel \ lcms2-devel libwebp-devel tcl-devel tk-devel</pre> </div> </div> <div class="section" id="mac-os-x-installation"> <h2>Mac OS X installation<a class="headerlink" href="#mac-os-x-installation" title="Permalink to this headline">¶</a></h2> <p>We provide binaries for OS X in the form of <a class="reference external" href="http://wheel.readthedocs.org/en/latest/index.html">Python Wheels</a>. Alternatively you can compile Pillow with with XCode.</p> <p>The easiest way to install external libraries is via <a class="reference external" href="http://mxcl.github.com/homebrew/">Homebrew</a>. After you install Homebrew, run:</p> <div class="highlight-python"><pre>$ brew install libtiff libjpeg webp little-cms2</pre> </div> <p>Install Pillow with:</p> <div class="highlight-python"><pre>$ pip install Pillow</pre> </div> </div> <div class="section" id="windows-installation"> <h2>Windows installation<a class="headerlink" href="#windows-installation" title="Permalink to this headline">¶</a></h2> <p>We provide binaries for Windows in the form of Python Eggs and <a class="reference external" href="http://wheel.readthedocs.org/en/latest/index.html">Python Wheels</a>:</p> <div class="section" id="id3"> <h3>Python Eggs<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last"><strong class="command">pip</strong> does not support Python Eggs; use <strong class="command">easy_install</strong> instead.</p> </div> <div class="highlight-python"><pre>$ easy_install Pillow</pre> </div> </div> <div class="section" id="id4"> <h3>Python Wheels<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Experimental. Requires setuptools >=0.8 and pip >=1.4.1</p> </div> <div class="highlight-python"><pre>$ pip install --use-wheel Pillow</pre> </div> <p>If the above does not work, it’s likely because we haven’t uploaded a wheel for the latest version of Pillow. In that case, try pinning it to a specific version:</p> <div class="highlight-python"><pre>$ pip install --use-wheel Pillow==2.3.0</pre> </div> </div> </div> <div class="section" id="freebsd-installation"> <h2>FreeBSD installation<a class="headerlink" href="#freebsd-installation" title="Permalink to this headline">¶</a></h2> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Only FreeBSD 10 tested</p> </div> <p>Make sure you have Python’s development libraries installed.:</p> <div class="highlight-python"><pre>$ sudo pkg install python2</pre> </div> <p>Or for Python 3:</p> <div class="highlight-python"><pre>$ sudo pkg install python3</pre> </div> <p>Prerequisites are installed on <strong>FreeBSD 10</strong> with:</p> <div class="highlight-python"><pre>$ sudo pkg install jpeg tiff webp lcms2 freetype2</pre> </div> </div> <div class="section" id="platform-support"> <h2>Platform support<a class="headerlink" href="#platform-support" title="Permalink to this headline">¶</a></h2> <p>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, OS X, and Windows.</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Contributors please test on your platform, edit this document, and send a pull request.</p> </div> <table border="1" class="docutils"> <colgroup> <col width="26%" /> <col width="10%" /> <col width="23%" /> <col width="23%" /> <col width="18%" /> </colgroup> <tbody valign="top"> <tr class="row-odd"><td><strong>Operating system</strong></td> <td><strong>Supported</strong></td> <td><strong>Tested Python versions</strong></td> <td><strong>Tested Pillow versions</strong></td> <td><strong>Tested processors</strong></td> </tr> <tr class="row-even"><td>Mac OS X 10.8 Mountain Lion</td> <td>Yes</td> <td>2.6,2.7,3.2,3.3</td> <td> </td> <td>x86-64</td> </tr> <tr class="row-odd"><td>Mac OS X 10.7 Lion</td> <td>Yes</td> <td>2.6,2.7,3.2,3.3</td> <td>2.2.0</td> <td>x86-64</td> </tr> <tr class="row-even"><td>Redhat Linux 6</td> <td>Yes</td> <td>2.6</td> <td> </td> <td>x86</td> </tr> <tr class="row-odd"><td>CentOS 6.3</td> <td>Yes</td> <td>2.7,3.3</td> <td> </td> <td>x86</td> </tr> <tr class="row-even"><td>Fedora 20</td> <td>Yes</td> <td>2.7,3.3</td> <td>2.3.0</td> <td>x86-64</td> </tr> <tr class="row-odd"><td>Ubuntu Linux 10.04 LTS</td> <td>Yes</td> <td>2.6</td> <td>2.3.0</td> <td>x86,x86-64</td> </tr> <tr class="row-even"><td>Ubuntu Linux 12.04 LTS</td> <td>Yes</td> <td><p class="first">2.6,2.7,3.2,3.3,PyPy2.1</p> <p class="last">2.7,3.2</p> </td> <td><p class="first">2.3.0</p> <p class="last">2.3.0</p> </td> <td><p class="first">x86,x86-64</p> <p class="last">ppc</p> </td> </tr> <tr class="row-odd"><td>Ubuntu Linux 13.10</td> <td>Yes</td> <td>2.7,3.2,3.3</td> <td>2.3.0</td> <td>x86</td> </tr> <tr class="row-even"><td>Raspian Wheezy</td> <td>Yes</td> <td>2.7,3.2</td> <td>2.3.0</td> <td>arm</td> </tr> <tr class="row-odd"><td>Gentoo Linux</td> <td>Yes</td> <td>2.7,3.2</td> <td>2.1.0</td> <td>x86-64</td> </tr> <tr class="row-even"><td>FreeBSD 10</td> <td>Yes</td> <td>2.7,3.4</td> <td>2.4,2.3.1</td> <td>x86-64</td> </tr> <tr class="row-odd"><td>Windows 7 Pro</td> <td>Yes</td> <td>2.7,3.2,3.3</td> <td>2.2.1</td> <td>x86-64</td> </tr> <tr class="row-even"><td>Windows Server 2008 R2 Enterprise</td> <td>Yes</td> <td>3.3</td> <td> </td> <td>x86-64</td> </tr> <tr class="row-odd"><td>Windows 8 Pro</td> <td>Yes</td> <td>2.6,2.7,3.2,3.3,3.4a3</td> <td>2.2.0</td> <td>x86,x86-64</td> </tr> <tr class="row-even"><td>Windows 8.1 Pro</td> <td>Yes</td> <td>2.6,2.7,3.2,3.3,3.4</td> <td>2.3.0, 2.4.0</td> <td>x86,x86-64</td> </tr> </tbody> </table> </div> <div class="section" id="old-versions"> <h2>Old Versions<a class="headerlink" href="#old-versions" title="Permalink to this headline">¶</a></h2> <p>You can download old distributions from <a class="reference external" href="https://pypi.python.org/pypi/Pillow">PyPI</a>. Only the latest 1.x and 2.x releases are visible, but all releases are available by direct URL access e.g. <a class="reference external" href="https://pypi.python.org/pypi/Pillow/1.0">https://pypi.python.org/pypi/Pillow/1.0</a>.</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Installation</a><ul> <li><a class="reference internal" href="#simple-installation">Simple installation</a></li> <li><a class="reference internal" href="#external-libraries">External libraries</a></li> <li><a class="reference internal" href="#linux-installation">Linux installation</a></li> <li><a class="reference internal" href="#mac-os-x-installation">Mac OS X installation</a></li> <li><a class="reference internal" href="#windows-installation">Windows installation</a><ul> <li><a class="reference internal" href="#id3">Python Eggs</a></li> <li><a class="reference internal" href="#id4">Python Wheels</a></li> </ul> </li> <li><a class="reference internal" href="#freebsd-installation">FreeBSD installation</a></li> <li><a class="reference internal" href="#platform-support">Platform support</a></li> <li><a class="reference internal" href="#old-versions">Old Versions</a></li> </ul> </li> </ul> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/installation.txt" rel="nofollow">Show Source</a></li> </ul><h3>Need help?</h3> <p> You can get help via IRC at <a href="irc://irc.freenode.net#pil">irc://irc.freenode.net#pil</a> or Stack Overflow <a href="http://stackoverflow.com/questions/tagged/pillow">here</a> and <a href="http://stackoverflow.com/questions/tagged/pil">here</a>. Please <a href="https://github.com/python-pillow/Pillow/issues/new">report issues on GitHub</a>. </p> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="about.html" title="About Pillow" >next</a> |</li> <li class="right" > <a href="index.html" title="Pillow" >previous</a> |</li> <li><a href="index.html">Home</a> »</li> </ul> </div> <div class="footer"> © Copyright 1997-2011 by Secret Labs AB, 1995-2011 by Fredrik Lundh, 2010-2013 Alex Clark. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>