@@ -31,8 +31,8 @@ precompiled wheel for your OS and Python.
31
31
TkAgg.
32
32
33
33
For support of other GUI frameworks, LaTeX rendering, saving
34
- animations and a larger selection of file formats, you need to
35
- install :ref: `additional dependencies < install_requirements > `.
34
+ animations and a larger selection of file formats, you can
35
+ install :ref: `optional_dependencies `.
36
36
37
37
Although not required, we suggest also installing ``IPython `` for
38
38
interactive use. To easily install a complete Scientific Python
@@ -73,6 +73,8 @@ If you are interested in contributing to Matplotlib development,
73
73
running the latest source code, or just like to build everything
74
74
yourself, it is not difficult to build Matplotlib from source.
75
75
76
+ First you need to install the :ref: `dependencies `.
77
+
76
78
A C compiler is required. Typically, on Linux, you will need ``gcc ``, which
77
79
should be installed using your distribution's package manager; on macOS, you
78
80
will need xcode _; on Windows, you will need Visual Studio 2015 or later.
@@ -135,149 +137,6 @@ file will be particularly useful to those packaging Matplotlib.
135
137
136
138
.. _setup.cfg : https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template
137
139
138
- .. _install_requirements :
139
-
140
- Dependencies
141
- ------------
142
-
143
- Matplotlib will automatically install dependencies when you install with
144
- ``pip ``, so this section is mostly for your reference.
145
-
146
- Matplotlib requires the following dependencies:
147
-
148
- * `Python <https://www.python.org/downloads/ >`_ (>= 3.7)
149
- * `NumPy <https://numpy.org >`_ (>= 1.16)
150
- * `setuptools <https://setuptools.readthedocs.io/en/latest/ >`_
151
- * `cycler <https://matplotlib.org/cycler/ >`_ (>= 0.10.0)
152
- * `dateutil <https://pypi.org/project/python-dateutil >`_ (>= 2.7)
153
- * `kiwisolver <https://github.com/nucleic/kiwi >`_ (>= 1.0.1)
154
- * `Pillow <https://pillow.readthedocs.io/en/latest/ >`_ (>= 6.2)
155
- * `pyparsing <https://pypi.org/project/pyparsing/ >`_ (>=2.2.1)
156
-
157
- Optionally, you can also install a number of packages to enable better user
158
- interface toolkits. See :ref: `what-is-a-backend ` for more details on the
159
- optional Matplotlib backends and the capabilities they provide.
160
-
161
- * Tk _ (>= 8.3, != 8.6.0 or 8.6.1): for the Tk-based backends.
162
- * PyQt4 _ (>= 4.6) or PySide _ (>= 1.0.3) [# ]_: for the Qt4-based backends.
163
- * PyQt5 _ or PySide2 _: for the Qt5-based backends.
164
- * PyGObject _: for the GTK3-based backends [# ]_.
165
- * wxPython _ (>= 4) [# ]_: for the wx-based backends.
166
- * pycairo _ (>= 1.11.0) or cairocffi _ (>= 0.8): for the GTK3 and/or cairo-based
167
- backends.
168
- * Tornado _: for the WebAgg backend.
169
-
170
- .. _Tk : https://docs.python.org/3/library/tk.html
171
- .. _PyQt4 : https://pypi.org/project/PyQt4
172
- .. _PySide : https://pypi.org/project/PySide
173
- .. _PyQt5 : https://pypi.org/project/PyQt5
174
- .. _PySide2 : https://pypi.org/project/PySide2
175
- .. _PyGObject : https://pygobject.readthedocs.io/en/latest/
176
- .. _wxPython : https://www.wxpython.org/
177
- .. _pycairo : https://pycairo.readthedocs.io/en/latest/
178
- .. _cairocffi : https://cairocffi.readthedocs.io/en/latest/
179
- .. _Tornado : https://pypi.org/project/tornado
180
-
181
- .. [# ] PySide cannot be pip-installed on Linux (but can be conda-installed).
182
- .. [# ] If using pip (and not conda), PyGObject must be built from source; see
183
- https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html.
184
- .. [# ] If using pip (and not conda) on Linux, wxPython wheels must be manually
185
- downloaded from https://wxpython.org/pages/downloads/.
186
-
187
- For better support of animation output format and image file formats, LaTeX,
188
- etc., you can install the following:
189
-
190
- * `ffmpeg <https://www.ffmpeg.org/ >`_: for saving movies.
191
- * `ImageMagick <https://www.imagemagick.org/script/index.php >`_: for saving
192
- animated gifs.
193
- * `LaTeX <https://www.latex-project.org/ >`_ (with `cm-super
194
- <https://ctan.org/pkg/cm-super> `__ ) and `GhostScript (>=9.0)
195
- <https://ghostscript.com/download/> `_ : for rendering text with
196
- LaTeX.
197
- * `fontconfig <https://www.fontconfig.org >`_ (>= 2.7): for detection of system
198
- fonts on Linux.
199
-
200
- FreeType and Qhull
201
- ------------------
202
-
203
- Matplotlib depends on FreeType _ (>= 2.3), a font rendering library, and on
204
- Qhull _ (>= 2020.2), a library for computing triangulations. By default,
205
- Matplotlib downloads and builds its own copies of FreeType (this is necessary
206
- to run the test suite, because different versions of FreeType rasterize
207
- characters differently) and of Qhull. As an exception, Matplotlib defaults to
208
- the system version of FreeType on AIX.
209
-
210
- .. _FreeType : https://www.freetype.org/
211
- .. _Qhull : http://www.qhull.org/
212
-
213
- To force Matplotlib to use a copy of FreeType or Qhull already installed in
214
- your system, create a :file: `setup.cfg ` file with the following contents:
215
-
216
- .. code-block :: cfg
217
-
218
- [libs]
219
- system_freetype = true
220
- system_qhull = true
221
-
222
- before running ``python -m pip install . ``.
223
-
224
- In this case, you need to install the FreeType and Qhull library and headers.
225
- This can be achieved using a package manager, e.g. for FreeType:
226
-
227
- .. code-block :: sh
228
-
229
- # Pick ONE of the following:
230
- sudo apt install libfreetype6-dev # Debian/Ubuntu
231
- sudo dnf install freetype-devel # Fedora
232
- brew install freetype # macOS with Homebrew
233
- conda install freetype # conda, any OS
234
-
235
- (adapt accordingly for Qhull).
236
-
237
- On Linux and macOS, it is also recommended to install pkg-config _, a helper
238
- tool for locating FreeType:
239
-
240
- .. code-block :: sh
241
-
242
- # Pick ONE of the following:
243
- sudo apt install pkg-config # Debian/Ubuntu
244
- sudo dnf install pkgconf # Fedora
245
- brew install pkg-config # macOS with Homebrew
246
- conda install pkg-config # conda
247
- # Or point the PKG_CONFIG environment variable to the path to pkg-config:
248
- export PKG_CONFIG=...
249
-
250
- .. _pkg-config : https://www.freedesktop.org/wiki/Software/pkg-config/
251
-
252
- If not using pkg-config (in particular on Windows), you may need to set the
253
- include path (to the library headers) and link path (to the libraries)
254
- explicitly, if they are not in standard locations. This can be done using
255
- standard environment variables -- on Linux and OSX:
256
-
257
- .. code-block :: sh
258
-
259
- export CFLAGS=' -I/directory/containing/ft2build.h'
260
- export LDFLAGS=' -L/directory/containing/libfreetype.so'
261
-
262
- and on Windows:
263
-
264
- .. code-block :: bat
265
-
266
- set
EED3
CL = /IC:\directory\containing\ft2build.h
267
- set LINK = /LIBPATH:C:\directory\containing\freetype.lib
268
-
269
- .. note ::
270
-
271
- Matplotlib always uses its own copies of the following libraries:
272
-
273
- - ``Agg ``: the Anti-Grain Geometry C++ rendering engine;
274
- - ``ttconv ``: a TrueType font utility.
275
-
276
- If you go this route but need to reset and rebuild to change your settings,
277
- remember to clear your artifacts before re-building::
278
-
279
- git clean -xfd
280
-
281
140
Building on Windows
282
141
-------------------
283
142
@@ -286,9 +145,3 @@ Visual Studio 2015 or later.
286
145
287
146
If you are building your own Matplotlib wheels (or sdists), note that any DLLs
288
147
that you copy into the source tree will be packaged too.
289
-
290
- Conda packages
291
- --------------
292
-
293
- The conda packaging scripts for Matplotlib are available at
294
- https://github.com/conda-forge/matplotlib-feedstock.
0 commit comments