mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-09-21 11:28:58 +03:00
Recommend upgrading pip before Pillow, and use python -m pip
This commit is contained in:
parent
29c0a2fa6e
commit
a27e676b11
|
@ -46,7 +46,8 @@ Basic Installation
|
||||||
|
|
||||||
Install Pillow with :command:`pip`::
|
Install Pillow with :command:`pip`::
|
||||||
|
|
||||||
$ pip install Pillow
|
python -m pip install pip
|
||||||
|
python -m pip install Pillow
|
||||||
|
|
||||||
|
|
||||||
Windows Installation
|
Windows Installation
|
||||||
|
@ -57,7 +58,8 @@ supported Pythons in both 32 and 64-bit versions in wheel, egg, and
|
||||||
executable installers. These binaries have all of the optional
|
executable installers. These binaries have all of the optional
|
||||||
libraries included except for raqm and libimagequant::
|
libraries included except for raqm and libimagequant::
|
||||||
|
|
||||||
> pip install Pillow
|
python -m pip install pip
|
||||||
|
python -m pip install Pillow
|
||||||
|
|
||||||
|
|
||||||
macOS Installation
|
macOS Installation
|
||||||
|
@ -68,7 +70,8 @@ versions in the wheel format. These include support for all optional
|
||||||
libraries except libimagequant. Raqm support requires libraqm,
|
libraries except libimagequant. Raqm support requires libraqm,
|
||||||
fribidi, and harfbuzz to be installed separately::
|
fribidi, and harfbuzz to be installed separately::
|
||||||
|
|
||||||
$ pip install Pillow
|
python -m pip install pip
|
||||||
|
python -m pip install Pillow
|
||||||
|
|
||||||
Linux Installation
|
Linux Installation
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -78,7 +81,8 @@ versions in the manylinux wheel format. These include support for all
|
||||||
optional libraries except libimagequant. Raqm support requires
|
optional libraries except libimagequant. Raqm support requires
|
||||||
libraqm, fribidi, and harfbuzz to be installed separately::
|
libraqm, fribidi, and harfbuzz to be installed separately::
|
||||||
|
|
||||||
$ pip install Pillow
|
python -m pip install pip
|
||||||
|
python -m pip install Pillow
|
||||||
|
|
||||||
Most major Linux distributions, including Fedora, Debian/Ubuntu and
|
Most major Linux distributions, including Fedora, Debian/Ubuntu and
|
||||||
ArchLinux also include Pillow in packages that previously contained
|
ArchLinux also include Pillow in packages that previously contained
|
||||||
|
@ -194,7 +198,8 @@ Many of Pillow's features require external libraries:
|
||||||
|
|
||||||
Once you have installed the prerequisites, run::
|
Once you have installed the prerequisites, run::
|
||||||
|
|
||||||
$ pip install Pillow
|
python -m pip install pip
|
||||||
|
python -m pip install Pillow
|
||||||
|
|
||||||
If the prerequisites are installed in the standard library locations
|
If the prerequisites are installed in the standard library locations
|
||||||
for your machine (e.g. :file:`/usr` or :file:`/usr/local`), no
|
for your machine (e.g. :file:`/usr` or :file:`/usr/local`), no
|
||||||
|
@ -204,7 +209,7 @@ those locations by editing :file:`setup.py` or
|
||||||
:file:`setup.cfg`, or by adding environment variables on the command
|
:file:`setup.cfg`, or by adding environment variables on the command
|
||||||
line::
|
line::
|
||||||
|
|
||||||
$ CFLAGS="-I/usr/pkg/include" pip install pillow
|
CFLAGS="-I/usr/pkg/include" python -m pip install pillow
|
||||||
|
|
||||||
If Pillow has been previously built without the required
|
If Pillow has been previously built without the required
|
||||||
prerequisites, it may be necessary to manually clear the pip cache or
|
prerequisites, it may be necessary to manually clear the pip cache or
|
||||||
|
@ -248,11 +253,11 @@ Build Options
|
||||||
|
|
||||||
Sample usage::
|
Sample usage::
|
||||||
|
|
||||||
$ MAX_CONCURRENCY=1 python setup.py build_ext --enable-[feature] install
|
MAX_CONCURRENCY=1 python setup.py build_ext --enable-[feature] install
|
||||||
|
|
||||||
or using pip::
|
or using pip::
|
||||||
|
|
||||||
$ pip install pillow --global-option="build_ext" --global-option="--enable-[feature]"
|
python -m pip install pillow --global-option="build_ext" --global-option="--enable-[feature]"
|
||||||
|
|
||||||
|
|
||||||
Building on macOS
|
Building on macOS
|
||||||
|
@ -268,21 +273,22 @@ tools.
|
||||||
The easiest way to install external libraries is via `Homebrew
|
The easiest way to install external libraries is via `Homebrew
|
||||||
<https://brew.sh/>`_. After you install Homebrew, run::
|
<https://brew.sh/>`_. After you install Homebrew, run::
|
||||||
|
|
||||||
$ brew install libtiff libjpeg webp little-cms2
|
brew install libtiff libjpeg webp little-cms2
|
||||||
|
|
||||||
To install libraqm on macOS use Homebrew to install its dependencies::
|
To install libraqm on macOS use Homebrew to install its dependencies::
|
||||||
|
|
||||||
$ brew install freetype harfbuzz fribidi
|
brew install freetype harfbuzz fribidi
|
||||||
|
|
||||||
Then see ``depends/install_raqm_cmake.sh`` to install libraqm.
|
Then see ``depends/install_raqm_cmake.sh`` to install libraqm.
|
||||||
|
|
||||||
Now install Pillow with::
|
Now install Pillow with::
|
||||||
|
|
||||||
$ pip install Pillow
|
python -m pip install pip
|
||||||
|
python -m pip install Pillow
|
||||||
|
|
||||||
or from within the uncompressed source directory::
|
or from within the uncompressed source directory::
|
||||||
|
|
||||||
$ python setup.py install
|
python setup.py install
|
||||||
|
|
||||||
Building on Windows
|
Building on Windows
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -296,17 +302,17 @@ Building on FreeBSD
|
||||||
|
|
||||||
.. Note:: Only FreeBSD 10 and 11 tested
|
.. Note:: Only FreeBSD 10 and 11 tested
|
||||||
|
|
||||||
Make sure you have Python's development libraries installed.::
|
Make sure you have Python's development libraries installed::
|
||||||
|
|
||||||
$ sudo pkg install python2
|
sudo pkg install python2
|
||||||
|
|
||||||
Or for Python 3::
|
Or for Python 3::
|
||||||
|
|
||||||
$ sudo pkg install python3
|
sudo pkg install python3
|
||||||
|
|
||||||
Prerequisites are installed on **FreeBSD 10 or 11** with::
|
Prerequisites are installed on **FreeBSD 10 or 11** with::
|
||||||
|
|
||||||
$ sudo pkg install jpeg-turbo tiff webp lcms2 freetype2 openjpeg harfbuzz fribidi
|
sudo pkg install jpeg-turbo tiff webp lcms2 freetype2 openjpeg harfbuzz fribidi
|
||||||
|
|
||||||
Then see ``depends/install_raqm_cmake.sh`` to install libraqm.
|
Then see ``depends/install_raqm_cmake.sh`` to install libraqm.
|
||||||
|
|
||||||
|
@ -319,25 +325,25 @@ development libraries installed.
|
||||||
|
|
||||||
In Debian or Ubuntu::
|
In Debian or Ubuntu::
|
||||||
|
|
||||||
$ sudo apt-get install python-dev python-setuptools
|
sudo apt-get install python-dev python-setuptools
|
||||||
|
|
||||||
Or for Python 3::
|
Or for Python 3::
|
||||||
|
|
||||||
$ sudo apt-get install python3-dev python3-setuptools
|
sudo apt-get install python3-dev python3-setuptools
|
||||||
|
|
||||||
In Fedora, the command is::
|
In Fedora, the command is::
|
||||||
|
|
||||||
$ sudo dnf install python-devel redhat-rpm-config
|
sudo dnf install python-devel redhat-rpm-config
|
||||||
|
|
||||||
Or for Python 3::
|
Or for Python 3::
|
||||||
|
|
||||||
$ sudo dnf install python3-devel redhat-rpm-config
|
sudo dnf install python3-devel redhat-rpm-config
|
||||||
|
|
||||||
.. Note:: ``redhat-rpm-config`` is required on Fedora 23, but not earlier versions.
|
.. Note:: ``redhat-rpm-config`` is required on Fedora 23, but not earlier versions.
|
||||||
|
|
||||||
Prerequisites are installed on **Ubuntu 16.04 LTS** with::
|
Prerequisites are installed on **Ubuntu 16.04 LTS** with::
|
||||||
|
|
||||||
$ sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
|
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
|
||||||
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk \
|
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk \
|
||||||
libharfbuzz-dev libfribidi-dev
|
libharfbuzz-dev libfribidi-dev
|
||||||
|
|
||||||
|
@ -345,7 +351,7 @@ Then see ``depends/install_raqm.sh`` to install libraqm.
|
||||||
|
|
||||||
Prerequisites are installed on recent **RedHat** **Centos** or **Fedora** with::
|
Prerequisites are installed on recent **RedHat** **Centos** or **Fedora** with::
|
||||||
|
|
||||||
$ sudo dnf install libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel \
|
sudo dnf install libtiff-devel libjpeg-devel openjpeg2-devel zlib-devel \
|
||||||
freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \
|
freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel \
|
||||||
harfbuzz-devel fribidi-devel libraqm-devel libimagequant-devel
|
harfbuzz-devel fribidi-devel libraqm-devel libimagequant-devel
|
||||||
|
|
||||||
|
@ -362,7 +368,7 @@ Building on Android
|
||||||
Basic Android support has been added for compilation within the Termux
|
Basic Android support has been added for compilation within the Termux
|
||||||
environment. The dependencies can be installed by::
|
environment. The dependencies can be installed by::
|
||||||
|
|
||||||
$ pkg -y install python python-dev ndk-sysroot clang make \
|
pkg -y install python python-dev ndk-sysroot clang make \
|
||||||
libjpeg-turbo-dev
|
libjpeg-turbo-dev
|
||||||
|
|
||||||
This has been tested within the Termux app on ChromeOS, on x86.
|
This has been tested within the Termux app on ChromeOS, on x86.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user