-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathdependencies.html
More file actions
298 lines (276 loc) · 17.8 KB
/
dependencies.html
File metadata and controls
298 lines (276 loc) · 17.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dependencies — Matplotlib 3.4.2 documentation</title>
<link rel="stylesheet" href="../_static/mpl.css?v3.4.2-2-gf801f04d09-dirty" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
<link rel="stylesheet" type="text/css" href="../_static/plot_directive.css" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../_static/gallery.css" />
<link rel="stylesheet" type="text/css" href="../_static/gallery-binder.css" />
<link rel="stylesheet" type="text/css" href="../_static/gallery-dataframe.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/clipboard.min.js"></script>
<script src="../_static/copybutton.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Matplotlib 3.4.2 documentation"
href="../_static/opensearch.xml"/>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Minimum Version of Dependencies Policy" href="min_dep_policy.html" />
<link rel="prev" title="Release Guide" href="release_guide.html" />
<link rel="top" title="Matplotlib 3.4.2 documentation" href="#" />
<link rel="canonical" href="https://matplotlib.org/stable/devel/dependencies.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
<script data-domain="matplotlib.org" defer="defer" src="https://views.scientific-python.org/js/script.js"></script>
</head><body>
<div id="unreleased-message"> You are reading an old version of the documentation (v3.4.2). For the latest version see <a href="https://matplotlib.org/stable/devel/dependencies.html">https://matplotlib.org/stable/devel/dependencies.html</a></div>
<!--
<div id="annc-banner">
</div>
-->
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px; position: relative;">
<a href="../index.html">
<div style="float: left; position: absolute; width: 496px; bottom: 0; padding-bottom: 24px"><span style="float: right; color: #789; background: white">Version 3.4.2</span></div>
<img src="../_static/logo2_compressed.svg" height="125px" border="0" alt="matplotlib"/></a>
<!-- The "Fork me on github" ribbon -->
<div id="forkongithub"><a href="https://github.com/matplotlib/matplotlib">Fork me on GitHub</a></div>
</div>
<nav class="main-nav">
<ul>
<li><a href="../users/installing.html">Installation</a></li>
<li><a href="../contents.html">Documentation</a></li>
<li><a href="../gallery/index.html">Examples</a></li>
<li><a href="../tutorials/index.html">Tutorials</a></li>
<li><a href="index.html">Contributing</a></li>
<li class="nav-right">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" placeholder="Search"/>
</form>
</li>
</ul>
</nav>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="min_dep_policy.html" title="Minimum Version of Dependencies Policy"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="release_guide.html" title="Release Guide"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">home</a>| </li>
<li><a href="../contents.html">contents</a> »</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">The Matplotlib Developers' Guide</a> »</li>
<li class="nav-item nav-item-this"><a href="">Dependencies</a></li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Dependencies</a><ul>
<li><a class="reference internal" href="#mandatory-dependencies">Mandatory dependencies</a></li>
<li><a class="reference internal" href="#optional-dependencies">Optional dependencies</a><ul>
<li><a class="reference internal" href="#backends">Backends</a></li>
<li><a class="reference internal" href="#animations">Animations</a></li>
<li><a class="reference internal" href="#font-handling-and-rendering">Font handling and rendering</a></li>
</ul>
</li>
<li><a class="reference internal" href="#c-libraries">C libraries</a></li>
</ul>
</li>
</ul>
<div id="sidebar-pagesource" role="note" aria-label="source link"
style="margin-top: 1.5em; padding-top: 0.1em; border-top: 1px solid #86989b">
<a href="../_sources/devel/dependencies.rst.txt"
style="color: #c0c0c0" rel="nofollow">Show Page Source</a>
</div>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="dependencies">
<span id="id1"></span><h1>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h1>
<div class="section" id="mandatory-dependencies">
<h2>Mandatory dependencies<a class="headerlink" href="#mandatory-dependencies" title="Permalink to this headline">¶</a></h2>
<p>When installing through a package manager like <code class="docutils literal notranslate"><span class="pre">pip</span></code> or <code class="docutils literal notranslate"><span class="pre">conda</span></code>, the
mandatory dependencies are automatically installed. This list is mainly for
reference.</p>
<ul class="simple">
<li><a class="reference external" href="https://www.python.org/downloads/">Python</a> (>= 3.7)</li>
<li><a class="reference external" href="https://numpy.org">NumPy</a> (>= 1.16)</li>
<li><a class="reference external" href="https://setuptools.readthedocs.io/en/latest/">setuptools</a></li>
<li><a class="reference external" href="https://matplotlib.org/cycler/">cycler</a> (>= 0.10.0)</li>
<li><a class="reference external" href="https://pypi.org/project/python-dateutil">dateutil</a> (>= 2.7)</li>
<li><a class="reference external" href="https://github.com/nucleic/kiwi">kiwisolver</a> (>= 1.0.1)</li>
<li><a class="reference external" href="https://pillow.readthedocs.io/en/latest/">Pillow</a> (>= 6.2)</li>
<li><a class="reference external" href="https://pypi.org/project/pyparsing/">pyparsing</a> (>=2.2.1)</li>
</ul>
</div>
<div class="section" id="optional-dependencies">
<span id="id2"></span><h2>Optional dependencies<a class="headerlink" href="#optional-dependencies" title="Permalink to this headline">¶</a></h2>
<p>The following packages and tools are not required but extend the capabilities
of Matplotlib.</p>
<div class="section" id="backends">
<h3>Backends<a class="headerlink" href="#backends" title="Permalink to this headline">¶</a></h3>
<p>Matplotlib figures can be rendered to various user interfaces. See
<a class="reference internal" href="../tutorials/introductory/usage.html#what-is-a-backend"><span class="std std-ref">What is a backend?</span></a> for more details on the optional Matplotlib backends
and the capabilities they provide.</p>
<ul class="simple">
<li><a class="reference external" href="https://docs.python.org/3/library/tk.html">Tk</a> (>= 8.3, != 8.6.0 or 8.6.1) <a class="footnote-reference" href="#id7" id="id3">[1]</a>: for the Tk-based backends.</li>
<li><a class="reference external" href="https://pypi.org/project/PyQt4">PyQt4</a> (>= 4.6) or <a class="reference external" href="https://pypi.org/project/PySide">PySide</a> (>= 1.0.3) <a class="footnote-reference" href="#id8" id="id4">[2]</a>: for the Qt4-based backends.</li>
<li><a class="reference external" href="https://pypi.org/project/PyQt5">PyQt5</a> or <a class="reference external" href="https://pypi.org/project/PySide2">PySide2</a>: for the Qt5-based backends.</li>
<li><a class="reference external" href="https://pygobject.readthedocs.io/en/latest/">PyGObject</a>: for the GTK3-based backends <a class="footnote-reference" href="#id9" id="id5">[3]</a>.</li>
<li><a class="reference external" href="https://www.wxpython.org/">wxPython</a> (>= 4) <a class="footnote-reference" href="#id10" id="id6">[4]</a>: for the wx-based backends.</li>
<li><a class="reference external" href="https://pycairo.readthedocs.io/en/latest/">pycairo</a> (>= 1.11.0) or <a class="reference external" href="https://cairocffi.readthedocs.io/en/latest/">cairocffi</a> (>= 0.8): for the GTK3 and/or cairo-based
backends.</li>
<li><a class="reference external" href="https://pypi.org/project/tornado">Tornado</a>: for the WebAgg backend.</li>
</ul>
<table class="docutils footnote" frame="void" id="id7" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id3">[1]</a></td><td>Tk is part of most standard Python installations, but it's not part of
Python itself and thus may not be present in rare cases.</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id8" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id4">[2]</a></td><td>PySide cannot be pip-installed on Linux (but can be conda-installed).</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id9" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id5">[3]</a></td><td>If using pip (and not conda), PyGObject must be built from source; see
<a class="reference external" href="https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html">https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html</a>.</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id10" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id6">[4]</a></td><td>If using pip (and not conda) on Linux, wxPython wheels must be manually
downloaded from <a class="reference external" href="https://wxpython.org/pages/downloads/">https://wxpython.org/pages/downloads/</a>.</td></tr>
</tbody>
</table>
</div>
<div class="section" id="animations">
<h3>Animations<a class="headerlink" href="#animations" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://www.ffmpeg.org/">ffmpeg</a>: for saving movies.</li>
<li><a class="reference external" href="https://www.imagemagick.org/script/index.php">ImageMagick</a>: for saving
animated gifs.</li>
</ul>
</div>
<div class="section" id="font-handling-and-rendering">
<h3>Font handling and rendering<a class="headerlink" href="#font-handling-and-rendering" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://www.latex-project.org/">LaTeX</a> (with <a class="reference external" href="https://ctan.org/pkg/cm-super">cm-super</a> ) and <a class="reference external" href="https://ghostscript.com/download/">GhostScript (>=9.0)</a> : for rendering text with LaTeX.</li>
<li><a class="reference external" href="https://www.fontconfig.org">fontconfig</a> (>= 2.7): for detection of system
fonts on Linux.</li>
</ul>
</div>
</div>
<div class="section" id="c-libraries">
<h2>C libraries<a class="headerlink" href="#c-libraries" title="Permalink to this headline">¶</a></h2>
<p>Matplotlib brings its own copies of the following libraries:</p>
<ul class="simple">
<li><code class="docutils literal notranslate"><span class="pre">Agg</span></code>: the Anti-Grain Geometry C++ rendering engine</li>
<li><code class="docutils literal notranslate"><span class="pre">ttconv</span></code>: a TrueType font utility</li>
</ul>
<p>Additionally, Matplotlib depends on:</p>
<ul class="simple">
<li><a class="reference external" href="https://www.freetype.org/">FreeType</a> (>= 2.3): a font rendering library</li>
<li><a class="reference external" href="http://www.qhull.org/">QHull</a> (>= 2020.2): a library for computing triangulations</li>
</ul>
<p>By default, Matplotlib downloads and builds its own copies of FreeType (this is
necessary to run the test suite, because different versions of FreeType
rasterize characters differently) and of Qhull. As an exception, Matplotlib
defaults to the system version of FreeType on AIX.</p>
<p>To force Matplotlib to use a copy of FreeType or Qhull already installed in
your system, create a <code class="file docutils literal notranslate"><span class="pre">setup.cfg</span></code> file with the following contents:</p>
<div class="highlight-cfg notranslate"><div class="highlight"><pre><span></span><span class="k">[libs]</span>
<span class="na">system_freetype</span> <span class="o">=</span> <span class="s">true</span>
<span class="na">system_qhull</span> <span class="o">=</span> <span class="s">true</span>
</pre></div>
</div>
<p>before running <code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">.</span></code>.</p>
<p>In this case, you need to install the FreeType and Qhull library and headers.
This can be achieved using a package manager, e.g. for FreeType:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Pick ONE of the following:</span>
sudo apt install libfreetype6-dev <span class="c1"># Debian/Ubuntu</span>
sudo dnf install freetype-devel <span class="c1"># Fedora</span>
brew install freetype <span class="c1"># macOS with Homebrew</span>
conda install freetype <span class="c1"># conda, any OS</span>
</pre></div>
</div>
<p>(adapt accordingly for Qhull).</p>
<p>On Linux and macOS, it is also recommended to install <a class="reference external" href="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</a>, a helper
tool for locating FreeType:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># Pick ONE of the following:</span>
sudo apt install pkg-config <span class="c1"># Debian/Ubuntu</span>
sudo dnf install pkgconf <span class="c1"># Fedora</span>
brew install pkg-config <span class="c1"># macOS with Homebrew</span>
conda install pkg-config <span class="c1"># conda</span>
<span class="c1"># Or point the PKG_CONFIG environment variable to the path to pkg-config:</span>
<span class="nb">export</span> <span class="nv">PKG_CONFIG</span><span class="o">=</span>...
</pre></div>
</div>
<p>If not using pkg-config (in particular on Windows), you may need to set the
include path (to the library headers) and link path (to the libraries)
explicitly, if they are not in standard locations. This can be done using
standard environment variables -- on Linux and OSX:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">CFLAGS</span><span class="o">=</span><span class="s1">'-I/directory/containing/ft2build.h'</span>
<span class="nb">export</span> <span class="nv">LDFLAGS</span><span class="o">=</span><span class="s1">'-L/directory/containing/libfreetype.so'</span>
</pre></div>
</div>
<p>and on Windows:</p>
<div class="highlight-bat notranslate"><div class="highlight"><pre><span></span><span class="k">set</span> <span class="nv">CL</span><span class="p">=</span>/IC:\directory\containing\ft2build.h
<span class="k">set</span> <span class="nv">LINK</span><span class="p">=</span>/LIBPATH:C:\directory\containing\freetype.lib
</pre></div>
</div>
<p>If you go this route but need to reset and rebuild to change your settings,
remember to clear your artifacts before re-building:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clean</span> <span class="o">-</span><span class="n">xfd</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<footer>
<div class="footer">
© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2021 The Matplotlib development team.
<br />
Last updated on May 08, 2021.
Created using
<a href="http://sphinx-doc.org/">Sphinx</a> 3.2.1.
Doc version v3.4.2-2-gf801f04d09-dirty.
</div>
</footer>
</body>
</html>