1
1
.. _dependencies :
2
2
3
- ============
3
+ ************
4
4
Dependencies
5
- ============
5
+ ************
6
+
7
+ .. _runtime_dependencies :
6
8
7
9
Runtime dependencies
8
10
====================
9
11
10
12
11
- Mandatory dependencies
12
- ----------------------
13
+ Required
14
+ --------
13
15
14
16
When installing through a package manager like ``pip `` or ``conda ``, the
15
17
mandatory dependencies are automatically installed. This list is mainly for
@@ -31,8 +33,8 @@ reference.
31
33
32
34
.. _optional_dependencies :
33
35
34
- Optional dependencies
35
- ---------------------
36
+ Optional
37
+ --------
36
38
37
39
The following packages and tools are not required but extend the capabilities
38
40
of Matplotlib.
@@ -106,10 +108,14 @@ Additionally, Matplotlib depends on:
106
108
.. _FreeType : https://www.freetype.org/
107
109
.. _Qhull : http://www.qhull.org/
108
110
109
- By default, Matplotlib downloads and builds its own copies of FreeType (this is
110
- necessary to run the test suite, because different versions of FreeType
111
- rasterize characters differently) and of Qhull. As an exception, Matplotlib
112
- defaults to the system version of FreeType on AIX.
111
+
112
+ Download during install
113
+ ^^^^^^^^^^^^^^^^^^^^^^^
114
+
115
+ By default, Matplotlib downloads and builds its own copies of Qhull and FreeType.
116
+ The vendored version of FreeType is necessary to run the test suite, because
117
+ different versions of FreeType rasterize characters differently.
118
+
113
119
114
120
Use system libraries
115
121
^^^^^^^^^^^^^^^^^^^^
@@ -176,9 +182,8 @@ remember to clear your artifacts before re-building::
176
182
177
183
git clean -xfd
178
184
179
-
180
- Manual Download
181
- ^^^^^^^^^^^^^^^
185
+ From source files
186
+ ^^^^^^^^^^^^^^^^^
182
187
183
188
If the automatic download does not work (for example, on air-gapped systems) it is
184
189
preferable to instead use system libraries. However you can manually download the
@@ -202,19 +207,23 @@ In all cases the required version of pip is embedded in the CPython source.
202
207
203
208
.. _development-dependencies :
204
209
205
- Dependencies for building Matplotlib
206
- ====================================
210
+ Build dependencies
211
+ ==================
212
+
207
213
208
214
.. _setup-dependencies :
209
215
210
- Setup dependencies
211
- ------------------
216
+ Python
217
+ ------
218
+
219
+ By default, ``pip `` will build packages using build isolation, meaning that these
220
+ build dependencies are temporally installed by pip for the duration of the
221
+ Matplotlib build process. However, build isolation is disabled when :ref: `installing Matplotlib for development <development-install >`;
222
+ therefore we recommend using one of our :ref: `virtual environment configurations <dev-environment >` to
223
+ create a development environment in which these packages are automatically installed.
212
224
213
- By default, ``pip `` will build packages using build isolation, and the following
214
- dependencies will be automatically installed in the isolated environment to build
215
- Matplotlib. However, for development, you may wish to make an editable install, which
216
- will require disabling build isolation, so these build dependencies should be installed
217
- in your target environment manually:
225
+ If you are developing Matplotlib and unable to use our environment configurations,
226
+ then you must manually install the following packages into your development environment:
218
227
219
228
- `meson-python <https://meson-python.readthedocs.io/ >`_ (>= 0.13.1).
220
229
- `ninja <https://ninja-build.org/ >`_ (>= 1.8.2). This may be available in your package
@@ -230,11 +239,13 @@ in your target environment manually:
230
239
231
240
.. _compile-dependencies :
232
241
233
- C++ compiler
234
- ------------
242
+ Compiled extensions
243
+ -------------------
235
244
236
245
Matplotlib requires a C++ compiler that supports C++17, and each platform has a
237
246
development environment that must be installed before a compiler can be installed.
247
+ You may also need to install headers for various libraries used in the compiled extension
248
+ source files.
238
249
239
250
.. tab-set ::
240
251
@@ -261,6 +272,8 @@ development environment that must be installed before a compiler can be installe
261
272
262
273
Alternatively, you can install a Linux-like environment such as `CygWin <https://www.cygwin.com/ >`_
263
274
or `Windows Subsystem for Linux <https://learn.microsoft.com/en-us/windows/wsl/install >`_.
275
+ If using `MinGW-64 <https://www.mingw-w64.org/ >`_, we require **v6 ** of the
276
+ ```Mingw-w64-x86_64-headers ``.
264
277
265
278
266
279
We highly recommend that you install a compiler using your platform tool, i.e.,
@@ -294,16 +307,19 @@ Xcode, VS Code or Linux package manager. Choose **one** compiler from this list:
294
307
295
308
.. _test-dependencies :
296
309
297
- Dependencies for testing Matplotlib
298
- ===================================
310
+ Test dependencies
311
+ =================
312
+
299
313
This section lists the additional software required for
300
314
:ref: `running the tests <testing >`.
301
315
302
- Required:
316
+ Required
317
+ --------
303
318
304
319
- pytest _ (>= 7.0.0)
305
320
306
- Optional:
321
+ Optional
322
+ --------
307
323
308
324
In addition to all of the optional dependencies on the main library, for
309
325
testing the following will be used if they are installed.
@@ -357,11 +373,12 @@ them will be skipped by pytest.
357
373
358
374
.. _doc-dependencies :
359
375
360
- Dependencies for building Matplotlib's documentation
361
- ====================================================
376
+ Documentation dependencies
377
+ ==========================
378
+
379
+ Python
380
+ ------
362
381
363
- Python packages
364
- ---------------
365
382
The additional Python packages required to build the
366
383
:ref: `documentation <documenting-matplotlib >` are listed in
367
384
:file: `doc-requirements.txt ` and can be installed using ::
@@ -373,13 +390,22 @@ The content of :file:`doc-requirements.txt` is also shown below:
373
390
.. include :: ../../requirements/doc/doc-requirements.txt
374
391
:literal:
375
392
376
- Additional external dependencies
377
- --------------------------------
378
- Required:
379
393
394
+ External tools
395
+ --------------
396
+
397
+ The documentation requires LaTeX and Graphviz. These are not
398
+ Python packages and must be installed separately. The documentation can be
399
+ built without Inkscape and optipng, but the build process will raise various
400
+ warnings. If the build process warns that you are missing fonts, make sure
401
+ your LaTeX distribution bundles cm-super or install it separately.
402
+
403
+ Required
404
+ ^^^^^^^^
405
+
406
+ * `Graphviz <http://www.graphviz.org/download >`_
380
407
* a minimal working LaTeX distribution, e.g., `TeX Live <https://www.tug.org/texlive/ >`_ or
381
408
`MikTeX <https://miktex.org/ >`_
382
- * `Graphviz <http://www.graphviz.org/download >`_
383
409
* the following LaTeX packages (if your OS bundles TeX Live, the
384
410
"complete" version of the installer, e.g. "texlive-full" or "texlive-all",
385
411
will often automatically include these packages):
@@ -388,18 +414,11 @@ Required:
388
414
* `dvipng <https://ctan.org/pkg/dvipng >`_
389
415
* `underscore <https://ctan.org/pkg/underscore >`_
390
416
391
- Optional, but recommended:
417
+ Optional
418
+ ^^^^^^^^
392
419
393
420
* `Inkscape <https://inkscape.org >`_
394
421
* `optipng <http://optipng.sourceforge.net >`_
395
422
* the font "Humor Sans" (aka the "XKCD" font), or the free alternative
396
423
`Comic Neue <http://comicneue.com/ >`_
397
424
* the font "Times New Roman"
398
-
399
- .. note ::
400
-
401
- The documentation will not build without LaTeX and Graphviz. These are not
402
- Python packages and must be installed separately. The documentation can be
403
- built without Inkscape and optipng, but the build process will raise various
404
- warnings. If the build process warns that you are missing fonts, make sure
405
- your LaTeX distribution bundles cm-super or install it separately.
0 commit comments