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,20 @@ 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
+ Matplotlib figures can be rendered to various user interfaces. See
33
+ :ref: `what-is-a-backend ` for more details on the optional Matplotlib backends
34
+ and the capabilities they provide.
35
+
36
+ * Tk _ (>= 8.3, != 8.6.0 or 8.6.1) [# ]_: for the Tk-based backends.
26
37
* PyQt4 _ (>= 4.6) or PySide _ (>= 1.0.3) [# ]_: for the Qt4-based backends.
27
38
* PyQt5 _ or PySide2 _: for the Qt5-based backends.
28
39
* PyGObject _: for the GTK3-based backends [# ]_.
@@ -42,6 +53,8 @@ optional Matplotlib backends and the capabilities they provide.
42
53
.. _cairocffi : https://cairocffi.readthedocs.io/en/latest/
43
54
.. _Tornado : https://pypi.org/project/tornado
44
55
56
+ .. [# ] Tk is part of most standard Python installations, but it's not part of
57
+ Python itself and thus may not be present in rare cases.
45
58
.. [# ] PySide cannot be pip-installed on Linux (but can be conda-installed).
46
59
.. [# ] If using pip (and not conda), PyGObject must be built from source; see
47
60
https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html.
@@ -56,24 +69,31 @@ etc., you can install the following:
56
69
animated gifs.
57
70
* `LaTeX <https://www.latex-project.org/ >`_ (with `cm-super
58
71
<https://ctan.org/pkg/cm-super> `__ ) and `GhostScript (>=9.0)
59
- <https://ghostscript.com/download/> `_ : for rendering text with
60
- LaTeX.
72
+ <https://ghostscript.com/download/> `_ : for rendering text with LaTeX.
61
73
* `fontconfig <https://www.fontconfig.org >`_ (>= 2.7): for detection of system
62
74
fonts on Linux.
63
75
64
- FreeType and Qhull
65
- ------------------
76
+ C libraries
77
+ ===========
78
+
79
+ Matplotlib brings its own copies of the following libraries:
80
+
81
+ - ``Agg ``: the Anti-Grain Geometry C++ rendering engine
82
+ - ``ttconv ``: a TrueType font utility
66
83
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.
84
+ Additionally, Matplotlib depends on:
85
+
86
+ - FreeType _ (>= 2.3): a font rendering library
87
+ - QHull _ (>= 2020.2): a library for computing triangulations
73
88
74
89
.. _FreeType : https://www.freetype.org/
75
90
.. _Qhull : http://www.qhull.org/
76
91
92
+ By default, Matplotlib downloads and builds its own copies of FreeType (this is
93
+ necessary to run the test suite, because different versions of FreeType
94
+ rasterize characters differently) and of Qhull. As an exception, Matplotlib
95
+ defaults to the system version of FreeType on AIX.
96
+
77
97
To force Matplotlib to use a copy of FreeType or Qhull already installed in
78
98
your system, create a :file: `setup.cfg ` file with the following contents:
79
99
@@ -130,13 +150,6 @@ and on Windows:
130
150
set CL = /IC:\directory\containing\ft2build.h
131
151
set LINK = /LIBPATH:C:\directory\containing\freetype.lib
132
152
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
153
If you go this route but need to reset and rebuild to change your settings,
141
154
remember to clear your artifacts before re-building::
142
155
0 commit comments