@@ -9,19 +9,36 @@ Installing
9
9
There are many different ways to install matplotlib, and the best way
10
10
depends on what operating system you are using, what you already have
11
11
installed, and how you want to use it. To avoid wading through all
12
- the details (and potential complications) on this page, the easiest
13
- thing for you to do is use one of the pre-packaged python
14
- distributions that already provide matplotlib built-in. The Enthought
15
- Python Distribution `(EPD)
16
- <http://www.enthought.com/products/epd.php>`_ for Windows, OS X or
17
- Redhat is an excellent choice that "just works" out of the box.
18
- Another excellent alternative for Windows users is `Python (x, y)
19
- <http://www.pythonxy.com/>`_ which tends to be updated a bit more
20
- frequently. Both of these packages include matplotlib and pylab, and
21
- *lots* of other useful tools. matplotlib is also packaged for almost
22
- every major Linux distribution. So if you are on Linux, your package
23
- manager will probably provide matplotlib prebuilt.
12
+ the details (and potential complications) on this page, there are several
13
+ convenient options.
24
14
15
+ Most platforms : scientific Python distributions
16
+ ================================================
17
+
18
+ The first option is to use one of the pre-packaged python distributions that
19
+ already provide matplotlib built-in. The Continuum.io Python distribution
20
+ `(Anaconda) <https://store.continuum.io/cshop/anaconda/>`_ and the Enthought
21
+ distribution `(Canopy) <https://www.enthought.com/products/canopy/>`_ are both
22
+ excellent choices that "just work" out of the box for Windows, OSX and common
23
+ Linux platforms. Both of these distributions include matplotlib and *lots* of
24
+ other useful tools. Another excellent alternative for Windows users is
25
+ `Python (x, y) <https://code.google.com/p/pythonxy>`_ .
26
+
27
+ Linux : using your package manager
28
+ ==================================
29
+
30
+ If you are on Linux, you might prefer to use your package manager. matplotlib
31
+ is packaged for almost every major Linux distribution.
32
+
33
+ * Debian / Ubuntu : ``sudo apt-get install python-matplotlib``
34
+ * Fedora / Redhat : ``sudo yum install python-matplotlib``
35
+
36
+ Mac OSX - using pip
37
+ ===================
38
+
39
+ If you are on Mac OSX you can probably install matplotlib binaries using the
40
+ standard Python installation program `pip <https://pypi.python.org/pip>`_.
41
+ See :ref:`installing-osx-binaries`.
25
42
26
43
Manually installing pre-built packages
27
44
======================================
@@ -36,7 +53,7 @@ on your machine, and if not, install it. The official python builds
36
53
are available for download `here <http://www.python.org/download>`_,
37
54
but OS X users please read :ref:`which-python-for-osx`.
38
55
39
- Once you have python up and running, you will need to install `numpy
56
+ Once you have Python up and running, you will need to install `numpy
40
57
<http://www.numpy.org/>`_. numpy provides high-performance array data
41
58
structures and mathematical functions, and is a requirement for
42
59
matplotlib. You can test your progress::
@@ -90,28 +107,73 @@ toolkits and interactive settings that are discussed in
90
107
Installing on Windows
91
108
---------------------
92
109
93
- If you don't already have python installed, you may want to consider
94
- using the Enthought edition of python, which has scipy, numpy, and
95
- wxpython, plus many other useful packages, preinstalled - `Enthought
96
- Python <http://www.enthought.com/python>`_. With the Enthought
97
- edition of python + matplotlib installer, the following backends
98
- should work out of the box: agg, wx, wxagg, tkagg, ps, pdf and svg.
99
-
100
- For standard python installations, you will also need to install numpy
101
- in addition to the matplotlib installer. On some systems you will
102
- also need to download msvcp71.dll library, which you can download from
103
- http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71 or other
104
- sites. You will need to unzip the archive and drag the dll into
105
- :file:`c:\windows\system32`.
106
-
107
- All of the GUI backends run on Windows, but TkAgg is probably the
108
- best for interactive use from the standard python shell or ipython.
109
- The Windows installer (:file:`*.exe`) on the download page contains all the
110
- code you need to get up and running. However, there are many
111
- examples that are not included in the Windows installer. If you
112
- want to try the many demos that come in the matplotlib source
110
+ If you don't already have Python installed, we recommend using
111
+ one of the `scipy-stack compatible Python distributions
112
+ <http://www.scipy.org/install.html>`_ such as Python(x,y),
113
+ Enthought Canopy, or Continuum Anaconda, which have matplotlib and
114
+ many of its dependencies, plus other useful packages, preinstalled.
115
+
116
+ For `standard Python <http://www.python.org/download/>`_ installations
117
+ you will also need to install compatible versions of
118
+ `setuptools <https://pypi.python.org/pypi/setuptools/>`_,
119
+ `numpy <https://pypi.python.org/pypi/numpy/>`_,
120
+ `python-dateutil <https://pypi.python.org/pypi/python-dateutil/>`_,
121
+ `pytz <https://pypi.python.org/pypi/pytz>`_,
122
+ `pyparsing <https://pypi.python.org/pypi/pyparsing/>`_ and
123
+ `six <https://pypi.python.org/pypi/six>`_
124
+ in addition to
125
+ `matplotlib <https://pypi.python.org/pypi/matplotlib>`_.
126
+
127
+ In case Python is not installed for all users (not the default), the
128
+ Microsoft Visual C++ 2008 (
129
+ `64 bit <http://www.microsoft.com/download/en/details.aspx?id=15336>`_
130
+ or
131
+ `32 bit <http://www.microsoft.com/download/en/details.aspx?id=29>`_
132
+ for Python 2.6 to 3.2) or Microsoft Visual C++ 2010 (
133
+ `64 bit <http://www.microsoft.com/en-us/download/details.aspx?id=14632>`_
134
+ or
135
+ `32 bit <http://www.microsoft.com/en-us/download/details.aspx?id=5555>`_
136
+ for Python 3.3 and 3.4) redistributable packages need to be installed.
137
+
138
+ Matplotlib depends on `Pillow <https://pypi.python.org/pypi/Pillow>`_
139
+ for reading and saving JPEG, BMP, and TIFF image files.
140
+ Matplotlib requires `MiKTeX <http://miktex.org/>`_ and
141
+ `GhostScript <http://www.ghostscript.com/download/>`_ for rendering text
142
+ with LaTeX.
143
+ `FFmpeg <https://www.ffmpeg.org/>`_, `avconv <https://libav.org/>`_,
144
+ `mencoder <http://www.mplayerhq.hu>`_, or
145
+ `ImageMagick <http://www.imagemagick.org/>`_ are required for the
146
+ animation module.
147
+
148
+ The following backends should work out of the box: agg, tkagg, ps,
149
+ pdf and svg.
150
+ For other backends you may need to install
151
+ `pycairo <https://pypi.python.org/pypi/pycairo>`_,
152
+ `PyQt4 <https://pypi.python.org/pypi/PyQt4>`_,
153
+ `PyQt5 <https://pypi.python.org/pypi/PyQt5>`_,
154
+ `PySide <https://pypi.python.org/pypi/PySide>`_,
155
+ `wxPython <https://pypi.python.org/pypi/wxPython>`_,
156
+ `PyGTK <https://pypi.python.org/pypi/PyGTK>`_,
157
+ `Tornado <https://pypi.python.org/pypi/tornado>`_,
158
+ or GhostScript.
159
+
160
+ TkAgg is probably the best backend for interactive use from the
161
+ standard Python shell or IPython. It is enabled as the default backend
162
+ for the official binaries. GTK3 is not supported on Windows.
163
+
164
+ The Windows installers (:file:`*.exe`) and wheels (:file:`*.whl`) on
165
+ the download page do not contain test data or example code.
166
+ If you want to try the many demos that come in the matplotlib source
113
167
distribution, download the zip file and look in the :file:`examples`
114
168
subdirectory.
169
+ To run the test suite, copy the lib\matplotlib\tests and
170
+ lib\mpl_toolkits\tests directories from the source distribution to
171
+ sys.prefix\Lib\site-packages\matplotlib and
172
+ sys.prefix\Lib\site-packages\mpl_toolkits respectively, and install
173
+ `nose <https://pypi.python.org/pypi/nose>`_,
174
+ `mock <https://pypi.python.org/pypi/mock>`_,
175
+ Pillow, MiKTeX, GhostScript, ffmpeg, avconv, mencoder, ImageMagick, and
176
+ `Inkscape <http://inkscape.org/>`_.
115
177
116
178
.. _install_from_source:
117
179
@@ -161,7 +223,7 @@ manager on Linux, you may need to install the development packages
161
223
162
224
.. note::
163
225
164
- If you are on debian/ubuntu , you can get all the dependencies
226
+ If you are on Debian/Ubuntu , you can get all the dependencies
165
227
required to build matplotlib with::
166
228
167
229
sudo apt-get build-dep python-matplotlib
@@ -198,6 +260,12 @@ six 1.3 or later
198
260
Python 2/3 compatibility library. This is also a dependency of
199
261
:term:`dateutil`.
200
262
263
+ libpng 1.2 (or later)
264
+ library for loading and saving :term:`PNG` files (`download
265
+ <http://www.libpng.org/pub/png/libpng.html>`__). libpng requires
266
+ zlib. If you are a Windows user, you can ignore this because we
267
+ build support into the matplotlib single-click installer
268
+
201
269
202
270
**Optional GUI frameworks**
203
271
@@ -241,13 +309,6 @@ ImageMagick
241
309
user, you can ignore this since we build support into the
242
310
matplotlib single click installer.
243
311
244
-
245
- libpng 1.2 (or later)
246
- library for loading and saving :term:`PNG` files (`download
247
- <http://www.libpng.org/pub/png/libpng.html>`__). libpng requires
248
- zlib. If you are a Windows user, you can ignore this because we
249
- build support into the matplotlib single-click installer
250
-
251
312
**Required libraries that ship with matplotlib**
252
313
253
314
:term:`agg` 2.4
0 commit comments