<divid="unreleased-message"> You are reading an old version of the documentation (v3.2.0). For the latest version see <ahref="https://matplotlib.org/stable/faq/installing_faq.html">https://matplotlib.org/stable/faq/installing_faq.html</a></div>
<li><aclass="reference internal" href="#report-a-compilation-problem">Report a compilation problem</a></li>
<li><aclass="reference internal" href="#matplotlib-compiled-fine-but-nothing-shows-up-when-i-use-it">Matplotlib compiled fine, but nothing shows up when I use it</a></li>
<li><aclass="reference internal" href="#how-to-completely-remove-matplotlib">How to completely remove Matplotlib</a></li>
<li><aclass="reference internal" href="#report-a-compilation-problem" id="id3">Report a compilation problem</a></li>
<li><aclass="reference internal" href="#matplotlib-compiled-fine-but-nothing-shows-up-when-i-use-it" id="id4">Matplotlib compiled fine, but nothing shows up when I use it</a></li>
<li><aclass="reference internal" href="#how-to-completely-remove-matplotlib" id="id5">How to completely remove Matplotlib</a></li>
<h2>Matplotlib compiled fine, but nothing shows up when I use it<aclass="headerlink" href="#matplotlib-compiled-fine-but-nothing-shows-up-when-i-use-it" title="Permalink to this headline">¶</a></h2>
<p>The first thing to try is a <aclass="reference internal" href="#clean-install"><spanclass="std std-ref">clean install</span></a> and see if
that helps. If not, the best way to test your install is by running a script,
rather than working interactively from a python shell or an integrated
development environment such as <strongclass="program">IDLE</strong> which add additional
complexities. Open up a UNIX shell or a DOS command prompt and run, for
<p>This will give you additional information about which backends Matplotlib is
loading, version information, and more. At this point you might want to make
sure you understand Matplotlib's <aclass="reference internal" href="../tutorials/introductory/customizing.html"><spanclass="doc">configuration</span></a>
process, governed by the <codeclass="file docutils literal notranslate"><spanclass="pre">matplotlibrc</span></code> configuration file which contains
instructions within and the concept of the Matplotlib backend.</p>
<p>If you are still having trouble, see <aclass="reference internal" href="troubleshooting_faq.html#reporting-problems"><spanclass="std std-ref">Getting help</span></a>.</p>
<spanid="clean-install"></span><h2>How to completely remove Matplotlib<aclass="headerlink" href="#how-to-completely-remove-matplotlib" title="Permalink to this headline">¶</a></h2>
<p>Occasionally, problems with Matplotlib can be solved with a clean
installation of the package. In order to fully remove an installed Matplotlib:</p>
<olclass="arabic simple">
<li>Delete the caches from your <aclass="reference internal" href="troubleshooting_faq.html#locating-matplotlib-config-dir"><spanclass="std std-ref">Matplotlib configuration directory</span></a>.</li>
<li>Delete any Matplotlib directories or eggs from your <aclass="reference internal" href="troubleshooting_faq.html#locating-matplotlib-install"><spanclass="std std-ref">installation
directory</span></a>.</li>
</ol>
</div>
<divclass="section" id="linux-notes">
<h2>Linux Notes<aclass="headerlink" href="#linux-notes" title="Permalink to this headline">¶</a></h2>
<p>To install Matplotlib at the system-level, we recommend that you use your
distribution's package manager. This will guarantee that Matplotlib's
dependencies will be installed as well.</p>
<p>If, for some reason, you cannot use the package manager, you may use the wheels
<p>or <aclass="reference internal" href="#install-from-git"><spanclass="std std-ref">build Matplotlib from source</span></a>.</p>
</div>
<divclass="section" id="osx-notes">
<h2>OSX Notes<aclass="headerlink" href="#osx-notes" title="Permalink to this headline">¶</a></h2>
<divclass="section" id="which-python-for-osx">
<spanid="id1"></span><h3>Which python for OSX?<aclass="headerlink" href="#which-python-for-osx" title="Permalink to this headline">¶</a></h3>
<p>Apple ships OSX with its own Python, in <codeclass="docutils literal notranslate"><spanclass="pre">/usr/bin/python</span></code>, and its own copy
of Matplotlib. Unfortunately, the way Apple currently installs its own copies
of NumPy, Scipy and Matplotlib means that these packages are difficult to
upgrade (see <aclass="reference external" href="https://github.com/MacPython/wiki/wiki/Which-Python#system-python-and-extra-python-packages">system python packages</a>). For that reason we strongly suggest
that you install a fresh version of Python and use that as the basis for
installing libraries such as NumPy and Matplotlib. One convenient way to
install Matplotlib with other useful Python software is to use one of the
excellent Python scientific software collections that are now available:</p>
<ulclass="simple">
<li><aclass="reference external" href="https://www.anaconda.com/">Anaconda</a> from <aclass="reference external" href="https://www.continuum.io">Continuum Analytics</a></li>
<li><aclass="reference external" href="https://www.enthought.com/products/canopy/">Canopy</a> from <aclass="reference external" href="https://www.enthought.com">Enthought</a></li>
</ul>
<p>These collections include Python itself and a wide range of libraries; if you
need a library that is not available from the collection, you can install it
yourself using standard methods such as <em>pip</em>. Continuum and Enthought offer
their own installation support for these collections; see the Ananconda and
Canopy web pages for more information.</p>
<p>Other options for a fresh Python install are the standard installer from
<aclass="reference external" href="https://www.python.org/downloads/mac-osx/">python.org</a>, or installing
Python using a general OSX package management system such as <aclass="reference external" href="http://brew.sh">homebrew</a> or <aclass="reference external" href="https://www.macports.org">macports</a>. Power users on
OSX will likely want one of homebrew or macports on their system to install
open source software packages, but it is perfectly possible to use these
systems with another source for your Python binary, such as Anaconda, Canopy
<spanid="install-osx-binaries"></span><h3>Installing OSX binary wheels<aclass="headerlink" href="#installing-osx-binary-wheels" title="Permalink to this headline">¶</a></h3>
<p>If you are using Python from <aclass="reference external" href="https://www.python.org">https://www.python.org</a>, Homebrew, or Macports,
then you can use the standard pip installer to install Matplotlib binaries in
the form of wheels.</p>
<p>pip is installed by default with python.org and Homebrew Python, but needs to
<p>(<codeclass="docutils literal notranslate"><spanclass="pre">sudo</span><spanclass="pre">python3.6</span><spanclass="pre">...</span></code> on Macports).</p>
<p>You might also want to install IPython or the Jupyter notebook (<codeclass="docutils literal notranslate"><spanclass="pre">python3</span><spanclass="pre">-mpip</span>
<h4>pip problems<aclass="headerlink" href="#pip-problems" title="Permalink to this headline">¶</a></h4>
<p>If you get errors with pip trying to run a compiler like <codeclass="docutils literal notranslate"><spanclass="pre">gcc</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">clang</span></code>,
then the first thing to try is to <aclass="reference external" href="https://guide.macports.org/chunked/installing.html#installing.xcode">install xcode</a> and
retry the install. If that does not work, then check
<p>If you get a result like <codeclass="docutils literal notranslate"><spanclass="pre">/usr/bin/python...</span></code>, then you are getting the
Python installed with OSX, which is probably not what you want. Try closing
and restarting Terminal.app before running the check again. If that doesn't fix
the problem, depending on which Python you wanted to use, consider reinstalling
Python.org Python, or check your homebrew or macports setup. Remember that
the disk image installer only works for Python.org Python, and will not get
picked up by other Pythons. If all these fail, please <aclass="reference internal" href="troubleshooting_faq.html#reporting-problems"><spanclass="std std-ref">let us know</span></a>.</p>
</div>
</div>
<divclass="section" id="install-from-source">
<spanid="install-from-git"></span><h2>Install from source<aclass="headerlink" href="#install-from-source" title="Permalink to this headline">¶</a></h2>
<p>This creates links and installs the command line script in the appropriate
places.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p>OSX users please see the <aclass="reference internal" href="../users/installing.html#build-osx"><spanclass="std std-ref">Building on macOS</span></a> guide.</p>
<pclass="last">Windows users please see the <aclass="reference internal" href="../users/installing.html#build-windows"><spanclass="std std-ref">Building on Windows</span></a> guide.</p>
</div>
<p>Then, if you want to update your Matplotlib at any time, just do:</p>
<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