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
@@ -35,113 +36,58 @@ precompiled wheel for your OS and Python.
35
36
install :ref: `optional_dependencies `.
36
37
37
38
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 :
39
+ interactive use.
45
40
46
- Scientific Python Distributions
47
- -------------------------------
41
+ =========================
42
+ Third-party distributions
43
+ =========================
48
44
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
- ======================
45
+ Various third-parties provide Matplotlib for their environements.
71
46
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.
47
+ Conda packages
48
+ ==============
49
+ Matplotlib is available both via the * anconda main channel *
75
50
76
- First you need to install the :ref: ` dependencies `.
51
+ .. code-block :: sh
77
52
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.
53
+ conda install matplotlib
81
54
82
- .. _ xcode : https://guide.macports.org/chunked/installing.html#installing.xcode
55
+ as well as via the * conda-forge community channel *
83
56
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::
57
+ .. code-block :: sh
87
58
88
- git clone https://github.com/matplotlib/matplotlib.git
89
-
90
- or::
59
+ conda install -c conda-forge matplotlib
91
60
92
- git clone git@github.com:matplotlib/matplotlib.git
61
+ Python distributions
62
+ ====================
93
63
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)::
64
+ Matplotlib is part of major Python distributions:
99
65
100
- cd matplotlib
101
- python -m pip install -e .
66
+ - `Anaconda <https://www.anaconda.com/ >`_
102
67
103
- If you're not developing, it can be installed from the source directory with
104
- a simple (just replace the last step)::
68
+ - ` ActiveState ActivePython
69
+ <https://www.activestate.com/activepython/downloads> `_
105
70
106
- python -m pip install .
71
+ - ` WinPython < https://winpython.github.io/ >`_
107
72
108
- To run the tests you will need to install some additional dependencies::
73
+ Linux package manager
74
+ =====================
109
75
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::
76
+ If you are using the Python version in your Linux distribution, you can install
77
+ Matplotlib via your package manager:
113
78
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
79
+ * Debian / Ubuntu: ``sudo apt-get install python3-matplotlib ``
80
+ * Fedora: ``sudo dnf install python3-matplotlib ``
81
+ * Red Hat: ``sudo yum install python3-matplotlib ``
82
+ * Arch: ``sudo pacman -S python-matplotlib ``
139
83
140
- Building on Windows
141
- -------------------
84
+ ======================
85
+ Installing from source
86
+ ======================
87
+ See :ref: `install_from_source `.
142
88
143
- Compiling Matplotlib (or any other extension module, for that matter) requires
144
- Visual Studio 2015 or later.
89
+ ==========================
90
+ Installing for development
91
+ ==========================
92
+ See :ref: `installing_for_devs `.
145
93
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