File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ Matplotlib requires the following dependencies:
142142 * `pytz <http://pytz.sourceforge.net/ >`__
143143 * FreeType (>= 2.3)
144144 * `cycler <http://matplotlib.org/cycler/ >`__ (>= 0.10.0)
145- * `six <https://pypi.python.org/pypi/six >`_
145+ * `six <https://pypi.python.org/pypi/six >`_ (>= 1.10)
146146 * `kiwisolver <https://github.com/nucleic/kiwi >`__ (>= 1.0.0)
147147
148148Optionally, you can also install a number of packages to enable better user
@@ -166,7 +166,7 @@ etc., you can install the following:
166166 <https://libav.org/avconv.html> `_: for saving movies;
167167 * `ImageMagick <https://www.imagemagick.org/script/index.php >`_: for saving
168168 animated gifs;
169- * `Pillow <https://pillow.readthedocs.io/en/latest/ >`_ (>=2.0 ): for a larger selection of
169+ * `Pillow <https://pillow.readthedocs.io/en/latest/ >`_ (>=3.4 ): for a larger selection of
170170 image file formats: JPEG, BMP, and TIFF image files;
171171 * `LaTeX <https://miktex.org/ >`_ and `GhostScript
172172 <https://ghostscript.com/download/> `_ (for rendering text with LaTeX).
Original file line number Diff line number Diff line change 5555
5656try :
5757 from PIL import Image
58- _has_pil = True
58+ from PIL import PILLOW_VERSION
59+ from distutils .version import LooseVersion
60+ if LooseVersion (PILLOW_VERSION ) >= LooseVersion ("3.4" ):
61+ _has_pil = True
62+ else :
63+ _has_pil = False
5964 del Image
6065except ImportError :
6166 _has_pil = False
Original file line number Diff line number Diff line change 4242from matplotlib .backends ._backend_agg import RendererAgg as _RendererAgg
4343from matplotlib import _png
4444
45- try :
45+ from matplotlib .backend_bases import _has_pil
46+
47+ if _has_pil :
4648 from PIL import Image
47- _has_pil = True
48- except ImportError :
49- _has_pil = False
5049
5150backend_version = 'v2.2'
5251
You can’t perform that action at this time.
0 commit comments