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.
@@ -176,9 +178,8 @@ remember to clear your artifacts before re-building::
176
178
177
179
git clean -xfd
178
180
179
-
180
- Manual Download
181
- ^^^^^^^^^^^^^^^
181
+ Install from source
182
+ ^^^^^^^^^^^^^^^^^^^
182
183
183
184
If the automatic download does not work (for example, on air-gapped systems) it is
184
185
preferable to instead use system libraries. However you can manually download the
@@ -202,19 +203,21 @@ In all cases the required version of pip is embedded in the CPython source.
202
203
203
204
.. _development-dependencies :
204
205
205
- Dependencies for building Matplotlib
206
- ====================================
206
+ Build dependencies
207
+ ==================
208
+
207
209
208
210
.. _setup-dependencies :
209
211
210
- Setup dependencies
211
- ------------------
212
+ Python
213
+ ------
212
214
213
215
By default, ``pip `` will build packages using build isolation, and the following
214
216
dependencies will be automatically installed in the isolated environment to build
215
217
Matplotlib. However, for development, you may wish to make an editable install, which
216
218
will require disabling build isolation, so these build dependencies should be installed
217
- in your target environment manually:
219
+ in the target environment manually.
220
+ :
218
221
219
222
- `meson-python <https://meson-python.readthedocs.io/ >`_ (>= 0.13.1).
220
223
- `ninja <https://ninja-build.org/ >`_ (>= 1.8.2). This may be available in your package
@@ -227,14 +230,21 @@ in your target environment manually:
227
230
Also a runtime dependency for editable installs.
228
231
- `NumPy <https://numpy.org >`_ (>= 1.21). Also a runtime dependency.
229
232
233
+ .. note ::
234
+
235
+ The Python packages listed here will be installed automatically if you are using
236
+ a virtual environment that was created following the instructions in :ref: `dev-environment `.
237
+
230
238
231
239
.. _compile-dependencies :
232
240
233
- C++ compiler
241
+ C-extensions
234
242
------------
235
243
236
244
Matplotlib requires a C++ compiler that supports C++17, and each platform has a
237
245
development environment that must be installed before a compiler can be installed.
246
+ You may also need to install headers for various libraries called in the C-extension
247
+ source files.
238
248
239
249
.. tab-set ::
240
250
@@ -294,16 +304,19 @@ Xcode, VS Code or Linux package manager. Choose **one** compiler from this list:
294
304
295
305
.. _test-dependencies :
296
306
297
- Dependencies for testing Matplotlib
298
- ===================================
307
+ Test dependencies
308
+ =================
309
+
299
310
This section lists the additional software required for
300
311
:ref: `running the tests <testing >`.
301
312
302
- Required:
313
+ Required
314
+ --------
303
315
304
316
- pytest _ (>= 7.0.0)
305
317
306
- Optional:
318
+ Optional
319
+ --------
307
320
308
321
In addition to all of the optional dependencies on the main library, for
309
322
testing the following will be used if they are installed.
@@ -357,11 +370,12 @@ them will be skipped by pytest.
357
370
358
371
.. _doc-dependencies :
359
372
360
- Dependencies for building Matplotlib's documentation
361
- ====================================================
373
+ Documentation dependencies
374
+ ==========================
375
+
376
+ Python
377
+ ------
362
378
363
- Python packages
364
- ---------------
365
379
The additional Python packages required to build the
366
380
:ref: `documentation <documenting-matplotlib >` are listed in
367
381
:file: `doc-requirements.txt ` and can be installed using ::
@@ -373,13 +387,22 @@ The content of :file:`doc-requirements.txt` is also shown below:
373
387
.. include :: ../../requirements/doc/doc-requirements.txt
374
388
:literal:
375
389
376
- Additional external dependencies
377
- --------------------------------
378
- Required:
379
390
391
+ External tools
392
+ --------------
393
+
394
+ The documentation requires LaTeX and Graphviz. These are not
395
+ Python packages and must be installed separately. The documentation can be
396
+ built without Inkscape and optipng, but the build process will raise various
397
+ warnings. If the build process warns that you are missing fonts, make sure
398
+ your LaTeX distribution bundles cm-super or install it separately.
399
+
400
+ Required
401
+ ^^^^^^^^
402
+
403
+ * `Graphviz <http://www.graphviz.org/download >`_
380
404
* a minimal working LaTeX distribution, e.g., `TeX Live <https://www.tug.org/texlive/ >`_ or
381
405
`MikTeX <https://miktex.org/ >`_
382
- * `Graphviz <http://www.graphviz.org/download >`_
383
406
* the following LaTeX packages (if your OS bundles TeX Live, the
384
407
"complete" version of the installer, e.g. "texlive-full" or "texlive-all",
385
408
will often automatically include these packages):
@@ -388,18 +411,11 @@ Required:
388
411
* `dvipng <https://ctan.org/pkg/dvipng >`_
389
412
* `underscore <https://ctan.org/pkg/underscore >`_
390
413
391
- Optional, but recommended:
414
+ Optional
415
+ ^^^^^^^^
392
416
393
417
* `Inkscape <https://inkscape.org >`_
394
418
* `optipng <http://optipng.sourceforge.net >`_
395
419
* the font "Humor Sans" (aka the "XKCD" font), or the free alternative
396
420
`Comic Neue <http://comicneue.com/ >`_
397
421
* 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