<divid="unreleased-message"> You are reading an old version of the documentation (v3.4.1). For the latest version see <ahref="/stable/">https://matplotlib.org/stable/</a></div>
<spanid="install-from-source"></span><h1>Installing from source<aclass="headerlink" href="#installing-from-source" title="Permalink to this headline">¶</a></h1>
<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>
<p>If you are building your own Matplotlib wheels (or sdists) on Windows, note
that any DLLs that you copy into the source tree will be packaged too.</p>