<divid="unreleased-message"> You are reading an old version of the documentation (v3.3.4). 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 the <aclass="reference external" href="https://www.anaconda.com/">Anaconda</a>
Python scientific software collection, which includes 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>.
See the Ananconda web page for installation support.</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
<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>
<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>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>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