1- ==================
2- Installation Guide
3- ==================
1+ ############
2+ Installation
3+ ############
44
5- .. note ::
5+ .. toctree ::
6+ :hidden:
67
7- If you wish to contribute to the project, it's recommended you
8- :ref: `install the latest development version<install_from_source> `.
8+ installing_source.rst
99
10- .. contents ::
1110
11+ ==============================
1212Installing an official release
1313==============================
1414
15- Matplotlib and its dependencies are available as wheel packages for macOS,
16- Windows and Linux distributions::
15+ Matplotlib releases are available as wheel packages for macOS, Windows and
16+ Linux on `PyPI <https://pypi.org/project/matplotlib/ >`_. Install it using
17+ ``pip ``:
18+
19+ .. code-block :: sh
1720
1821 python -m pip install -U pip
1922 python -m pip install -U matplotlib
@@ -34,114 +37,56 @@ precompiled wheel for your OS and Python.
3437 animations and a larger selection of file formats, you can
3538 install :ref: `optional_dependencies `.
3639
37- Although not required, we suggest also installing ``IPython `` for
38- interactive use. To easily install a complete Scientific Python
39- stack, see :ref: `install_scipy_dists ` below.
40-
41- Third-party distributions of Matplotlib
42- =======================================
43-
44- .. _install_scipy_dists :
45-
46- Scientific Python Distributions
47- -------------------------------
48-
49- `Anaconda <https://www.anaconda.com/ >`_ and `ActiveState
50- <https://www.activestate.com/activepython/downloads> `_ are excellent
51- choices that "just work" out of the box for Windows, macOS and common
52- Linux platforms. `WinPython <https://winpython.github.io/ >`_ is an
53- option for Windows users. All of these distributions include
54- Matplotlib and *lots * of other useful (data) science tools.
55-
56- Linux: using your package manager
57- ---------------------------------
40+ =========================
41+ Third-party distributions
42+ =========================
5843
59- If you are on Linux, you might prefer to use your package manager. Matplotlib
60- is packaged for almost every major Linux distribution.
44+ Various third-parties provide Matplotlib for their environments.
6145
62- * Debian / Ubuntu: ``sudo apt-get install python3-matplotlib ``
63- * Fedora: ``sudo dnf install python3-matplotlib ``
64- * Red Hat: ``sudo yum install python3-matplotlib ``
65- * Arch: ``sudo pacman -S python-matplotlib ``
66-
67- .. _install_from_source :
68-
69- Installing from source
70- ======================
46+ Conda packages
47+ ==============
48+ Matplotlib is available both via the *anaconda main channel *
7149
72- If you are interested in contributing to Matplotlib development,
73- running the latest source code, or just like to build everything
74- yourself, it is not difficult to build Matplotlib from source.
50+ .. code-block :: sh
7551
76- First you need to install the :ref: ` dependencies `.
52+ conda install matplotlib
7753
78- A C compiler is required. Typically, on Linux, you will need ``gcc ``, which
79- should be installed using your distribution's package manager; on macOS, you
80- will need xcode _; on Windows, you will need Visual Studio 2015 or later.
54+ as well as via the *conda-forge community channel *
8155
82- .. _ xcode : https://guide.macports.org/chunked/installing.html#installing.xcode
56+ .. code-block :: sh
8357
84- The easiest way to get the latest development version to start contributing
85- is to go to the git `repository <https://github.com/matplotlib/matplotlib >`_
86- and run::
58+ conda install -c conda-forge matplotlib
8759
88- git clone https://github.com/matplotlib/matplotlib.git
89-
90- or::
60+ Python distributions
61+ ====================
9162
92- git clone git@github.com:matplotlib/matplotlib.git
63+ Matplotlib is part of major Python distributions:
9364
94- If you're developing, it's better to do it in editable mode. The reason why
95- is that pytest's test discovery only works for Matplotlib
96- if installation is done this way. Also, editable mode allows your code changes
97- to be instantly propagated to your library code without reinstalling (though
98- you will have to restart your python process / kernel)::
65+ - `Anaconda <https://www.anaconda.com/ >`_
9966
100- cd matplotlib
101- python -m pip install -e .
67+ - ` ActiveState ActivePython
68+ <https://www.activestate.com/activepython/downloads> `_
10269
103- If you're not developing, it can be installed from the source directory with
104- a simple (just replace the last step)::
70+ - `WinPython <https://winpython.github.io/ >`_
10571
106- python -m pip install .
72+ Linux package manager
73+ =====================
10774
108- To run the tests you will need to install some additional dependencies::
75+ If you are using the Python version that comes with your Linux distribution,
76+ you can install Matplotlib via your package manager, e.g.:
10977
110- python -m pip install -r requirements/dev/dev-requirements.txt
111-
112- Then, if you want to update your Matplotlib at any time, just do::
113-
114- git pull
115-
116- When you run ``git pull ``, if the output shows that only Python files have
117- been updated, you are all set. If C files have changed, you need to run ``pip
118- install -e . `` again to compile them.
119-
120- There is more information on :ref: `using git <using-git >` in the developer
121- docs.
122-
123- .. warning ::
124-
125- The following instructions in this section are for very custom
126- installations of Matplotlib. Proceed with caution because these instructions
127- may result in your build producing unexpected behavior and/or causing
128- local testing to fail.
129-
130- If you would like to build from a tarball, grab the latest *tar.gz * release
131- file from `the PyPI files page <https://pypi.org/project/matplotlib/ >`_.
132-
133- We provide a `setup.cfg `_ file which you can use to customize the build
134- process. For example, which default backend to use, whether some of the
135- optional libraries that Matplotlib ships with are installed, and so on. This
136- file will be particularly useful to those packaging Matplotlib.
137-
138- .. _setup.cfg : https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template
78+ * Debian / Ubuntu: ``sudo apt-get install python3-matplotlib ``
79+ * Fedora: ``sudo dnf install python3-matplotlib ``
80+ * Red Hat: ``sudo yum install python3-matplotlib ``
81+ * Arch: ``sudo pacman -S python-matplotlib ``
13982
140- Building on Windows
141- -------------------
83+ ======================
84+ Installing from source
85+ ======================
86+ See :ref: `install_from_source `.
14287
143- Compiling Matplotlib (or any other extension module, for that matter) requires
144- Visual Studio 2015 or later.
88+ ==========================
89+ Installing for development
90+ ==========================
91+ See :ref: `installing_for_devs `.
14592
146- If you are building your own Matplotlib wheels (or sdists), note that any DLLs
147- that you copy into the source tree will be packaged too.
0 commit comments