1
- .. _ install_requirements :
1
+ .. _ dependencies :
2
2
3
3
============
4
4
Dependencies
5
5
============
6
6
7
- Matplotlib will automatically install dependencies when you install with
8
- `` pip ``, so this section is mostly for your reference.
7
+ Mandatory dependencies
8
+ ======================
9
9
10
- Matplotlib requires the following dependencies:
10
+ When installing through a package manager like ``pip `` or ``conda ``, the
11
+ mandatory dependencies are automatically installed. This list is mainly for
12
+ reference.
11
13
12
14
* `Python <https://www.python.org/downloads/ >`_ (>= 3.7)
13
15
* `NumPy <https://numpy.org >`_ (>= 1.16)
@@ -18,11 +20,23 @@ Matplotlib requires the following dependencies:
18
20
* `Pillow <https://pillow.readthedocs.io/en/latest/ >`_ (>= 6.2)
19
21
* `pyparsing <https://pypi.org/project/pyparsing/ >`_ (>=2.2.1)
20
22
21
- Optionally, you can also install a number of packages to enable better user
22
- interface toolkits. See :ref: `what-is-a-backend ` for more details on the
23
- optional Matplotlib backends and the capabilities they provide.
24
23
25
- * Tk _ (>= 8.3, != 8.6.0 or 8.6.1): for the Tk-based backends.
24
+ .. _optional_dependencies :
25
+
26
+ Optional dependencies
27
+ =====================
28
+
29
+ The following packages and tools are not required but extend the capabilities
30
+ of Matplotlib.
31
+
32
+ Backends
33
+ --------
34
+
35
+ Matplotlib figures can be rendered to various user interfaces. See
36
+ :ref: `what-is-a-backend ` for more details on the optional Matplotlib backends
37
+ and the capabilities they provide.
38
+
39
+ * Tk _ (>= 8.3, != 8.6.0 or 8.6.1) [# ]_: for the Tk-based backends.
26
40
* PyQt4 _ (>= 4.6) or PySide _ (>= 1.0.3) [# ]_: for the Qt4-based backends.
27
41
* PyQt5 _ or PySide2 _: for the Qt5-based backends.
28
42
* PyGObject _: for the GTK3-based backends [# ]_.
@@ -42,38 +56,51 @@ optional Matplotlib backends and the capabilities they provide.
42
56
.. _cairocffi : https://cairocffi.readthedocs.io/en/latest/
43
57
.. _Tornado : https://pypi.org/project/tornado
44
58
59
+ .. [# ] Tk is part of most standard Python installations, but it's not part of
60
+ Python itself and thus may not be present in rare cases.
45
61
.. [# ] PySide cannot be pip-installed on Linux (but can be conda-installed).
46
62
.. [# ] If using pip (and not conda), PyGObject must be built from source; see
47
63
https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html.
48
64
.. [# ] If using pip (and not conda) on Linux, wxPython wheels must be manually
49
65
downloaded from https://wxpython.org/pages/downloads/.
50
66
51
- For better support of animation output format and image file formats, LaTeX,
52
- etc., you can install the following:
67
+ Animations
68
+ ----------
53
69
54
70
* `ffmpeg <https://www.ffmpeg.org/ >`_: for saving movies.
55
71
* `ImageMagick <https://www.imagemagick.org/script/index.php >`_: for saving
56
72
animated gifs.
73
+
74
+ Font handling and rendering
75
+ ---------------------------
76
+
57
77
* `LaTeX <https://www.latex-project.org/ >`_ (with `cm-super
58
78
<https://ctan.org/pkg/cm-super> `__ ) and `GhostScript (>=9.0)
59
- <https://ghostscript.com/download/> `_ : for rendering text with
60
- LaTeX.
79
+ <https://ghostscript.com/download/> `_ : for rendering text with LaTeX.
61
80
* `fontconfig <https://www.fontconfig.org >`_ (>= 2.7): for detection of system
62
81
fonts on Linux.
63
82
64
- FreeType and Qhull
65
- ------------------
83
+ C libraries
84
+ ===========
66
85
67
- Matplotlib depends on FreeType _ (>= 2.3), a font rendering library, and on
68
- Qhull _ (>= 2020.2), a library for computing triangulations. By default,
69
- Matplotlib downloads and builds its own copies of FreeType (this is necessary
70
- to run the test suite, because different versions of FreeType rasterize
71
- characters differently) and of Qhull. As an exception, Matplotlib defaults to
72
- the system version of FreeType on AIX.
86
+ Matplotlib brings its own copies of the following libraries:
87
+
88
+ - ``Agg ``: the Anti-Grain Geometry C++ rendering engine
89
+ - ``ttconv ``: a TrueType font utility
90
+
91
+ Additionally, Matplotlib depends on:
92
+
93
+ - FreeType _ (>= 2.3): a font rendering library
94
+ - QHull _ (>= 2020.2): a library for computing triangulations
73
95
74
96
.. _FreeType : https://www.freetype.org/
75
97
.. _Qhull : http://www.qhull.org/
76
98
99
+ By default, Matplotlib downloads and builds its own copies of FreeType (this is
100
+ necessary to run the test suite, because different versions of FreeType
101
+ rasterize characters differently) and of Qhull. As an exception, Matplotlib
102
+ defaults to the system version of FreeType on AIX.
103
+
77
104
To force Matplotlib to use a copy of FreeType or Qhull already installed in
78
105
your system, create a :file: `setup.cfg ` file with the following contents:
79
106
@@ -130,13 +157,6 @@ and on Windows:
130
157
set CL = /IC:\directory\containing\ft2build.h
131
158
set LINK = /LIBPATH:C:\directory\containing\freetype.lib
132
159
133
- .. note ::
134
-
135
- Matplotlib always uses its own copies of the following libraries:
136
-
137
- - ``Agg ``: the Anti-Grain Geometry C++ rendering engine;
138
- - ``ttconv ``: a TrueType font utility.
139
-
140
160
If you go this route but need to reset and rebuild to change your settings,
141
161
remember to clear your artifacts before re-building::
142
162
0 commit comments