<liclass="toctree-l2"><aclass="reference internal" href="MEP/MEP12.html">MEP12: Improve Gallery and Examples</a></li>
<liclass="toctree-l2"><aclass="reference internal" href="MEP/MEP13.html">MEP13: Use properties for Artists</a></li>
<liclass="toctree-l2"><aclass="reference internal" href="MEP/MEP14.html">MEP14: Text handling</a></li>
<liclass="toctree-l2"><aclass="reference internal" href="MEP/MEP15.html">MEP15: Fix axis autoscaling when limits are specified for one axis only</a></li>
<spanid="id1"></span><h1>Dependencies<aclass="headerlink" href="#dependencies" title="Permalink to this heading">#</a></h1>
<sectionid="runtime-dependencies">
<h2>Runtime dependencies<aclass="headerlink" href="#runtime-dependencies" title="Permalink to this heading">#</a></h2>
<sectionid="mandatory-dependencies">
<h3>Mandatory dependencies<aclass="headerlink" href="#mandatory-dependencies" title="Permalink to this heading">#</a></h3>
<p>When installing through a package manager like <codeclass="docutils literal notranslate"><spanclass="pre">pip</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">conda</span></code>, the
mandatory dependencies are automatically installed. This list is mainly for
(>= 3.2.0; only required on Python < 3.10)</p></li>
</ul>
</section>
<sectionid="optional-dependencies">
<spanid="id3"></span><h3>Optional dependencies<aclass="headerlink" href="#optional-dependencies" title="Permalink to this heading">#</a></h3>
<p>The following packages and tools are not required but extend the capabilities
of Matplotlib.</p>
<sectionid="backends">
<h4>Backends<aclass="headerlink" href="#backends" title="Permalink to this heading">#</a></h4>
<p>Matplotlib figures can be rendered to various user interfaces. See
<aclass="reference internal" href="../users/explain/backends.html#what-is-a-backend"><spanclass="std std-ref">What is a backend?</span></a> for more details on the optional Matplotlib backends
and the capabilities they provide.</p>
<ulclass="simple">
<li><p><aclass="reference external" href="https://docs.python.org/3/library/tk.html">Tk</a> (>= 8.4, != 8.6.0 or 8.6.1): for the Tk-based backends. 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.</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/PyQt6/">PyQt6</a> (>= 6.1), <aclass="reference external" href="https://pypi.org/project/PySide6/">PySide6</a>, <aclass="reference external" href="https://pypi.org/project/PyQt5/">PyQt5</a>, or <aclass="reference external" href="https://pypi.org/project/PySide2/">PySide2</a>: for the Qt-based backends.</p></li>
<li><p><aclass="reference external" href="https://pygobject.readthedocs.io/en/latest/">PyGObject</a> and <aclass="reference external" href="https://pycairo.readthedocs.io/en/latest/">pycairo</a> (>= 1.14.0): for the GTK-based backends. If using pip
(but not conda or system package manager) PyGObject must be built from
source; see <aclass="reference external" href="https://pygobject.readthedocs.io/en/latest/devguide/dev_environ.html">pygobject documentation</a>.</p></li>
<li><p><aclass="reference external" href="https://pycairo.readthedocs.io/en/latest/">pycairo</a> (>= 1.14.0) or <aclass="reference external" href="https://cairocffi.readthedocs.io/en/latest/">cairocffi</a> (>= 0.8): for cairo-based backends.</p></li>
<li><p><aclass="reference external" href="https://www.wxpython.org/">wxPython</a> (>= 4): for the wx-based backends. If using pip (but not conda or
system package manager) on Linux wxPython wheels must be manually downloaded
from <aclass="reference external" href="https://wxpython.org/pages/downloads/">https://wxpython.org/pages/downloads/</a>.</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/tornado/">Tornado</a> (>= 5): for the WebAgg backend.</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/ipykernel/">ipykernel</a>: for the nbagg backend.</p></li>
<li><p>macOS (>= 10.12): for the macosx backend.</p></li>
</ul>
</section>
<sectionid="animations">
<h4>Animations<aclass="headerlink" href="#animations" title="Permalink to this heading">#</a></h4>
<ulclass="simple">
<li><p><aclass="reference external" href="https://www.ffmpeg.org/">ffmpeg</a>: for saving movies.</p></li>
<li><p><aclass="reference external" href="https://www.imagemagick.org/script/index.php">ImageMagick</a>: for saving
animated gifs.</p></li>
</ul>
</section>
<sectionid="font-handling-and-rendering">
<h4>Font handling and rendering<aclass="headerlink" href="#font-handling-and-rendering" title="Permalink to this heading">#</a></h4>
<ulclass="simple">
<li><p><aclass="reference external" href="https://www.latex-project.org/">LaTeX</a> (with <aclass="reference external" href="https://ctan.org/pkg/cm-super">cm-super</a> and <aclass="reference external" href="https://ctan.org/pkg/underscore">underscore</a>) and <aclass="reference external" href="https://ghostscript.com/releases/">GhostScript (>= 9.0)</a>: for rendering text with LaTeX.</p></li>
<li><p><aclass="reference external" href="https://www.fontconfig.org">fontconfig</a> (>= 2.7): for detection of system
fonts on Linux.</p></li>
</ul>
</section>
</section>
<sectionid="c-libraries">
<h3>C libraries<aclass="headerlink" href="#c-libraries" title="Permalink to this heading">#</a></h3>
<p>Matplotlib brings its own copies of the following libraries:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">Agg</span></code>: the Anti-Grain Geometry C++ rendering engine</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">ttconv</span></code>: a TrueType font utility</p></li>
</ul>
<p>Additionally, Matplotlib depends on:</p>
<ulclass="simple">
<li><p><aclass="reference external" href="https://www.freetype.org/">FreeType</a> (>= 2.3): a font rendering library</p></li>
<li><p><aclass="reference external" href="http://www.qhull.org/">QHull</a> (>= 2020.2): a library for computing triangulations</p></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 <codeclass="file docutils literal notranslate"><spanclass="pre">mplsetup.cfg</span></code> file with the following contents:</p>
brew<spanclass="w"></span>install<spanclass="w"></span>freetype<spanclass="w"></span><spanclass="c1"># macOS with Homebrew</span>
conda<spanclass="w"></span>install<spanclass="w"></span>freetype<spanclass="w"></span><spanclass="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 <aclass="reference external" href="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</a>, a helper
tool for locating FreeType:</p>
<divclass="highlight-sh notranslate"><divclass="highlight"><pre><span></span><spanclass="c1"># Pick ONE of the following:</span>
<h3>Minimum pip / manylinux support (linux)<aclass="headerlink" href="#minimum-pip-manylinux-support-linux" title="Permalink to this heading">#</a></h3>
<spanid="development-dependencies"></span><h2>Dependencies for building Matplotlib<aclass="headerlink" href="#dependencies-for-building-matplotlib" title="Permalink to this heading">#</a></h2>
<sectionid="setup-dependencies">
<spanid="id4"></span><h3>Setup dependencies<aclass="headerlink" href="#setup-dependencies" title="Permalink to this heading">#</a></h3>
<ulclass="simple">
<li><p><aclass="reference external" href="https://pypi.org/project/certifi/">certifi</a> (>= 2020.06.20). Used while
downloading the freetype and QHull source during build. This is not a
runtime dependency.</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/setuptools-scm/">setuptools_scm</a> (>= 7). Used to
update the reported <codeclass="docutils literal notranslate"><spanclass="pre">mpl.__version__</span></code> based on the current git commit.
Also a runtime dependency for editable installs.</p></li>
<li><p><aclass="reference external" href="https://numpy.org">NumPy</a> (>= 1.20). Also a runtime dependency.</p></li>
</ul>
</section>
<sectionid="c-compiler">
<spanid="compile-dependencies"></span><h3>C++ compiler<aclass="headerlink" href="#c-compiler" title="Permalink to this heading">#</a></h3>
<p>Matplotlib requires a C++ compiler that supports C++11.</p>
<ulclass="simple">
<li><p><aclass="reference external" href="https://gcc.gnu.org/projects/cxx-status.html#cxx11">gcc 4.8.1</a> or higher. For gcc <6.5 you will
need to set <codeclass="docutils literal notranslate"><spanclass="pre">$CFLAGS=-std=c++11</span></code> to enable C++11 support.
<li><p><aclass="reference external" href="https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-140">Visual Studio 2015</a>
(aka VS 14.0) or higher. A free version of Build Tools for Visual Studio is available for
<spanid="test-dependencies"></span><h2>Dependencies for testing Matplotlib<aclass="headerlink" href="#dependencies-for-testing-matplotlib" title="Permalink to this heading">#</a></h2>
<p>This section lists the additional software required for
<aclass="reference internal" href="testing.html#testing"><spanclass="std std-ref">running the tests</span></a>.</p>
<li><p><aclass="reference external" href="https://pypi.org/project/nbformat/">nbformat</a> and <aclass="reference external" href="https://pypi.org/project/nbconvert/">nbconvert</a> used to test the notebook backend</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/pandas/">pandas</a> used to test compatibility with Pandas</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/pikepdf/">pikepdf</a> used in some tests for the pgf and pdf backends</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/psutil/">psutil</a> used in testing the interactive backends</p></li>
<li><p><aclass="reference external" href="https://pytest-cov.readthedocs.io/en/latest/">pytest-cov</a> (>= 2.3.1) to collect coverage information</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/pytest-flake8/">pytest-flake8</a> to test coding standards using <aclass="reference external" href="https://pypi.org/project/flake8/">flake8</a></p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/pytest-timeout/">pytest-timeout</a> to limit runtime in case of stuck tests</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/pytest-xdist/">pytest-xdist</a> to run tests in parallel</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/pytest-xvfb/">pytest-xvfb</a> to run tests without windows popping up (Linux)</p></li>
<li><p><aclass="reference external" href="https://fonts.google.com/noto/use#faq">pytz</a> used to test pytz int</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/Sphinx/">sphinx</a> used to test our sphinx extensions</p></li>
<li><p>WenQuanYi Zen Hei and <aclass="reference external" href="https://fonts.google.com/noto/use">Noto Sans CJK</a>
fonts for testing font fallback and non-western fonts</p></li>
<li><p><aclass="reference external" href="https://pypi.org/project/xarray/">xarray</a> used to test compatibility with xarray</p></li>
</ul>
<p>If any of these dependencies are not discovered the tests that rely on them
will be skipped by pytest.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>When installing Inkscape on Windows, make sure that you select “Add
Inkscape to system PATH”, either for all users or current user, or the
<spanid="doc-dependencies"></span><h2>Dependencies for building Matplotlib's documentation<aclass="headerlink" href="#dependencies-for-building-matplotlib-s-documentation" title="Permalink to this heading">#</a></h2>
<sectionid="python-packages">
<h3>Python packages<aclass="headerlink" href="#python-packages" title="Permalink to this heading">#</a></h3>
<p>The additional Python packages required to build the
<aclass="reference internal" href="documenting_mpl.html#documenting-matplotlib"><spanclass="std std-ref">documentation</span></a> are listed in
<codeclass="file docutils literal notranslate"><spanclass="pre">doc-requirements.txt</span></code> and can be installed using</p>