File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ Matplotlib requires the following dependencies:
142
142
* `pytz <http://pytz.sourceforge.net/ >`__
143
143
* FreeType (>= 2.3)
144
144
* `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)
146
146
* `kiwisolver <https://github.com/nucleic/kiwi >`__ (>= 1.0.0)
147
147
148
148
Optionally, you can also install a number of packages to enable better user
@@ -166,7 +166,7 @@ etc., you can install the following:
166
166
<https://libav.org/avconv.html> `_: for saving movies;
167
167
* `ImageMagick <https://www.imagemagick.org/script/index.php >`_: for saving
168
168
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
170
170
image file formats: JPEG, BMP, and TIFF image files;
171
171
* `LaTeX <https://miktex.org/ >`_ and `GhostScript
172
172
<https://ghostscript.com/download/> `_ (for rendering text with LaTeX).
Original file line number Diff line number Diff line change 55
55
56
56
try :
57
57
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
59
64
del Image
60
65
except ImportError :
61
66
_has_pil = False
Original file line number Diff line number Diff line change 42
42
from matplotlib .backends ._backend_agg import RendererAgg as _RendererAgg
43
43
from matplotlib import _png
44
44
45
- try :
45
+ from matplotlib .backend_bases import _has_pil
46
+
47
+ if _has_pil :
46
48
from PIL import Image
47
- _has_pil = True
48
- except ImportError :
49
- _has_pil = False
50
49
51
50
backend_version = 'v2.2'
52
51
You can’t perform that action at this time.
0 commit comments