1
- ==================
2
- Installation Guide
3
- ==================
1
+ ############
2
+ Installation
3
+ ############
4
4
5
- .. note ::
5
+ .. toctree ::
6
+ :hidden:
6
7
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
9
9
10
- .. contents ::
11
10
11
+ ==============================
12
12
Installing an official release
13
13
==============================
14
14
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 ``::
17
18
18
19
python -m pip install -U pip
19
20
python -m pip install -U matplotlib
@@ -34,114 +35,56 @@ precompiled wheel for your OS and Python.
34
35
animations and a larger selection of file formats, you can
35
36
install :ref: `optional_dependencies `.
36
37
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
- ---------------------------------
58
-
59
- If you are on Linux, you might prefer to use your package manager. Matplotlib
60
- is packaged for almost every major Linux distribution.
61
-
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
- ======================
71
-
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.
75
-
76
- First you need to install the :ref: `dependencies `.
77
-
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.
81
-
82
- .. _xcode : https://guide.macports.org/chunked/installing.html#installing.xcode
83
-
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::
87
-
88
- git clone https://github.com/matplotlib/matplotlib.git
89
-
90
- or::
38
+ =========================
39
+ Third-party distributions
40
+
B41A
=========================
91
41
92
- git clone git@github.com:matplotlib/matplotlib.git
42
+ Various third-parties provide Matplotlib for their environements.
93
43
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)::
44
+ Conda packages
45
+ ==============
46
+ Matplotlib is available both via the *anconda main channel *
99
47
100
- cd matplotlib
101
- python -m pip install -e .
48
+ .. code-block :: sh
102
49
103
- If you're not developing, it can be installed from the source directory with
104
- a simple (just replace the last step)::
50
+ conda install matplotlib
105
51
106
- python -m pip install .
52
+ as well as via the * conda-forge community channel *
107
53
108
- To run the tests you will need to install some additional dependencies::
54
+ .. code-block :: sh
109
55
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::
56
+ conda install -c conda-forge matplotlib
113
57
114
- git pull
58
+ Python distributions
59
+ ====================
115
60
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.
61
+ Matplotlib is part of major Python distributions:
119
62
120
- There is more information on :ref: `using git <using-git >` in the developer
121
- docs.
63
+ - `Anaconda <https://www.anaconda.com/ >`_
122
64
123
- .. warning ::
65
+ - `ActiveState ActivePython
66
+ <https://www.activestate.com/activepython/downloads> `_
124
67
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.
68
+ - `WinPython <https://winpython.github.io/ >`_
129
69
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/ >`_.
70
+ Linux package manager
71
+ =====================
132
72
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.
73
+ If you are using the Python version that comes with your Linux distribution,
74
+ you can install Matplotlib via your package manager, e.g.:
137
75
138
- .. _setup.cfg : https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template
76
+ * Debian / Ubuntu: ``sudo apt-get install python3-matplotlib ``
77
+ * Fedora: ``sudo dnf install python3-matplotlib ``
78
+ * Red Hat: ``sudo yum install python3-matplotlib ``
79
+ * Arch: ``sudo pacman -S python-matplotlib ``
139
80
140
- Building on Windows
141
- -------------------
81
+ ======================
82
+ Installing from source
83
+ ======================
84
+ See :ref: `install_from_source `.
142
85
143
- Compiling Matplotlib (or any other extension module, for that matter) requires
144
- Visual Studio 2015 or later.
86
+ ==========================
87
+ Installing for development
88
+ ==========================
89
+ See :ref: `installing_for_devs `.
145
90
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