<divid="unreleased-message"> You are reading an old version of the documentation (v3.4.0). For the latest version see <ahref="https://matplotlib.org/stable/users/installing.html">https://matplotlib.org/stable/users/installing.html</a></div>
<h1><aclass="toc-backref" href="#id1">Installation Guide</a><aclass="headerlink" href="#installation-guide" title="Permalink to this headline">¶</a></h1>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">If you wish to contribute to the project, it's recommended you
<aclass="reference internal" href="#install-from-source"><spanclass="std std-ref">install the latest development version</span></a>.</p>
<h2><aclass="toc-backref" href="#id2">Installing an official release</a><aclass="headerlink" href="#installing-an-official-release" title="Permalink to this headline">¶</a></h2>
<p>Matplotlib and its dependencies are available as wheel packages for macOS,
<h2><aclass="toc-backref" href="#id3">Third-party distributions of Matplotlib</a><aclass="headerlink" href="#third-party-distributions-of-matplotlib" title="Permalink to this headline">¶</a></h2>
<spanid="install-scipy-dists"></span><h3><aclass="toc-backref" href="#id4">Scientific Python Distributions</a><aclass="headerlink" href="#scientific-python-distributions" title="Permalink to this headline">¶</a></h3>
<p><aclass="reference external" href="https://www.anaconda.com/">Anaconda</a> and <aclass="reference external" href="https://www.activestate.com/activepython/downloads">ActiveState</a> are excellent
choices that "just work" out of the box for Windows, macOS and common
Linux platforms. <aclass="reference external" href="https://winpython.github.io/">WinPython</a> is an
option for Windows users. All of these distributions include
Matplotlib and <em>lots</em> of other useful (data) science tools.</p>
<h3><aclass="toc-backref" href="#id5">Linux: using your package manager</a><aclass="headerlink" href="#linux-using-your-package-manager" title="Permalink to this headline">¶</a></h3>
<p>If you are on Linux, you might prefer to use your package manager. Matplotlib
is packaged for almost every major Linux distribution.</p>
<spanid="install-from-source"></span><h2><aclass="toc-backref" href="#id6">Installing from source</a><aclass="headerlink" href="#installing-from-source" title="Permalink to this headline">¶</a></h2>
<p>If you are interested in contributing to Matplotlib development,
running the latest source code, or just like to build everything
yourself, it is not difficult to build Matplotlib from source.</p>
<p>First you need to install the <aclass="reference internal" href="../devel/dependencies.html#dependencies"><spanclass="std std-ref">Dependencies</span></a>.</p>
<p>A C compiler is required. Typically, on Linux, you will need <codeclass="docutils literal notranslate"><spanclass="pre">gcc</span></code>, which
should be installed using your distribution's package manager; on macOS, you
will need <aclass="reference external" href="https://guide.macports.org/chunked/installing.html#installing.xcode">xcode</a>; on Windows, you will need Visual Studio 2015 or later.</p>
<p>The easiest way to get the latest development version to start contributing
is to go to the git <aclass="reference external" href="https://github.com/matplotlib/matplotlib">repository</a>
<p>When you run <codeclass="docutils literal notranslate"><spanclass="pre">git</span><spanclass="pre">pull</span></code>, if the output shows that only Python files have
been updated, you are all set. If C files have changed, you need to run <codeclass="docutils literal notranslate"><spanclass="pre">pip</span>
<spanclass="pre">install</span><spanclass="pre">-e</span><spanclass="pre">.</span></code> again to compile them.</p>
<p>There is more information on <aclass="reference internal" href="../devel/gitwash/index.html#using-git"><spanclass="std std-ref">using git</span></a> in the developer
docs.</p>
<divclass="admonition warning">
<pclass="first admonition-title">Warning</p>
<pclass="last">The following instructions in this section are for very custom
installations of Matplotlib. Proceed with caution because these instructions
may result in your build producing unexpected behavior and/or causing
local testing to fail.</p>
</div>
<p>If you would like to build from a tarball, grab the latest <em>tar.gz</em> release
file from <aclass="reference external" href="https://pypi.org/project/matplotlib/">the PyPI files page</a>.</p>
<p>We provide a <aclass="reference external" href="https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template">setup.cfg</a> file which you can use to customize the build
process. For example, which default backend to use, whether some of the
optional libraries that Matplotlib ships with are installed, and so on. This
file will be particularly useful to those packaging Matplotlib.</p>
<divclass="section" id="building-on-windows">
<h3><aclass="toc-backref" href="#id7">Building on Windows</a><aclass="headerlink" href="#building-on-windows" title="Permalink to this headline">¶</a></h3>
<p>Compiling Matplotlib (or any other extension module, for that matter) requires
Visual Studio 2015 or later.</p>
<p>If you are building your own Matplotlib wheels (or sdists), note that any DLLs
that you copy into the source tree will be packaged too.</p>