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,21 @@ 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
+ ------
212
218
213
219
By default, ``pip `` will build packages using build isolation, and the following
214
220
dependencies will be automatically installed in the isolated environment to build
215
221
Matplotlib. However, for development, you may wish to make an editable install, which
216
222
will require disabling build isolation, so these build dependencies should be installed
217
- in your target environment manually:
223
+ in the target environment manually.
224
+ :
218
225
219
226
- `meson-python <https://meson-python.readthedocs.io/ >`_ (>= 0.13.1).
220
227
- `ninja <https://ninja-build.org/ >`_ (>= 1.8.2). This may be available in your package
@@ -227,14 +234,21 @@ in your target environment manually:
227
234
Also a runtime dependency for editable installs.
228
235
- `NumPy <https://numpy.org >`_ (>= 1.21). Also a runtime dependency.
229
236
237
+ .. note ::
238
+
239
+ The Python packages listed here will be installed automatically if you are using
240
+ a virtual environment that was created following the instructions in :ref: `dev-environment `.
241
+
230
242
231
243
.. _compile-dependencies :
232
244
233
- C++ compiler
245
+ C-extensions
234
246
------------
235
247
236
248
Matplotlib requires a C++ compiler that supports C++17, and each platform has a
237
249
development environment that must be installed before a compiler can be installed.
250
+ You may also need to install headers for various libraries called in the C-extension
251
+ source files.
238
252
239
253
.. tab-set ::
240
254
@@ -261,6 +275,8 @@ development environment that must be installed before a compiler can be installe
261
275
262
276
Alternatively, you can install a Linux-like environment such as `CygWin <https://www.cygwin.com/ >`_
263
277
or `Windows Subsystem for Linux <https://learn.microsoft.com/en-us/windows/wsl/install >`_.
278
+ If using `MinGW-64 <https://www.mingw-w64.org/ >`_, we require **v6 ** of the
279
+ ```Mingw-w64-x86_64-headers ``.
264
280
265
281
266
282
We highly recommend that you install a compiler using your platform tool, i.e.,
@@ -294,16 +310,19 @@ Xcode, VS Code or Linux package manager. Choose **one** compiler from this list:
294
310
295
311
.. _test-dependencies :
296
312
297
- Dependencies for testing Matplotlib
298
- ===================================
313
+ Test dependencies
314
+ =================
315
+
299
316
This section lists the additional software required for
300
317
:ref: `running the tests <testing >`.
301
318
302
- Required:
319
+ Required
320
+ --------
303
321
304
322
- pytest _ (>= 7.0.0)
305
323
306
- Optional:
324
+ Optional
325
+ --------
307
326
308
327
In addition to all of the optional dependencies on the main library, for
309
328
testing the following will be used if they are installed.
@@ -357,11 +376,12 @@ them will be skipped by pytest.
357
376
358
377
.. _doc-dependencies :
359
378
360
- Dependencies for building Matplotlib's documentation
361
- ====================================================
379
+ Documentation dependencies
380
+ ==========================
381
+
382
+ Python
383
+ ------
362
384
363
- Python packages
364
- ---------------
365
385
The additional Python packages required to build the
366
386
:ref: `documentation <documenting-matplotlib >` are listed in
367
387
:file: `doc-requirements.txt ` and can be installed using ::
@@ -373,13 +393,22 @@ The content of :file:`doc-requirements.txt` is also shown below:
373
393
.. include :: ../../requirements/doc/doc-requirements.txt
374
394
:literal:
375
395
376
- Additional external dependencies
377
- --------------------------------
378
- Required:
379
396
397
+ External tools
398
+ --------------
399
+
400
+ The documentation requires LaTeX and Graphviz. These are not
401
+ Python packages and must be installed separately. The documentation can be
402
+ built without Inkscape and optipng, but the build process will raise various
403
+ warnings. If the build process warns that you are missing fonts, make sure
404
+ your LaTeX distribution bundles cm-super or install it separately.
405
+
406
+ Required
407
+ ^^^^^^^^
408
+
409
+ * `Graphviz <http://www.graphviz.org/download >`_
380
410
* a minimal working LaTeX distribution, e.g., `TeX Live <https://www.tug.org/texlive/ >`_ or
381
411
`MikTeX <https://miktex.org/ >`_
382
- * `Graphviz <http://www.graphviz.org/download >`_
383
412
* the following LaTeX packages (if your OS bundles TeX Live, the
384
413
"complete" version of the installer, e.g. "texlive-full" or "texlive-all",
385
414
will often automatically include these packages):
@@ -388,18 +417,11 @@ Required:
388
417
* `dvipng <https://ctan.org/pkg/dvipng >`_
389
418
* `underscore <https://ctan.org/pkg/underscore >`_
390
419
391
- Optional, but recommended:
420
+ Optional
421
+ ^^^^^^^^
392
422
393
423
* `Inkscape <https://inkscape.org >`_
394
424
* `optipng <http://optipng.sourceforge.net >`_
395
425
* the font "Humor Sans" (aka the "XKCD" font), or the free alternative
396
426
`Comic Neue <http://comicneue.com/ >`_
397
427
* 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