@@ -12,100 +12,44 @@ installed, and how you want to use it. To avoid wading through all
12
12
the details (and potential complications) on this page, there are several
13
13
convenient options.
14
14
15
+ Installing pre-built packages
16
+ =============================
17
+
15
18
Most platforms : scientific Python distributions
16
- ================================================
19
+ ------------------------------------------------
20
+
21
+ The first option is to use one of the pre-packaged python
22
+ distributions that already provide matplotlib built-in. The
23
+ Continuum.io Python distribution (`Anaconda
24
+ <https://store.continuum.io/cshop/anaconda/>`_ or `miniconda
25
+ <http://conda.pydata.org/miniconda.html>`_) and the Enthought
26
+ distribution `(Canopy) <https://www.enthought.com/products/canopy/>`_
27
+ are both excellent choices that "just work" out of the box for
28
+ Windows, OSX and common Linux platforms. Both of these distributions
29
+ include matplotlib and *lots* of other useful tools. Another
30
+ excellent alternative for Windows users is `Python (x, y)
31
+ <https://code.google.com/p/pythonxy>`_ .
17
32
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
33
27
34
Linux : using your package manager
28
- ==================================
35
+ ----------------------------------
29
36
30
37
If you are on Linux, you might prefer to use your package manager. matplotlib
31
38
is packaged for almost every major Linux distribution.
32
39
33
40
* Debian / Ubuntu : ``sudo apt-get install python-matplotlib``
34
41
* Fedora / Redhat : ``sudo yum install python-matplotlib``
35
42
36
- Mac OSX - using pip
37
- ===================
43
+ Mac OSX : using pip
44
+ -------------------
38
45
39
46
If you are on Mac OSX you can probably install matplotlib binaries using the
40
47
standard Python installation program `pip <https://pypi.python.org/pip>`_.
41
- See :ref:`installing-osx-binaries`.
42
-
43
- Manually installing pre-built packages
44
- ======================================
45
-
46
- General instructions
47
- --------------------
48
-
49
- For some people, the prepackaged pythons discussed above are not an
50
- option. That's OK, it's usually pretty easy to get a custom install
51
- working. You will first need to find out if you have python installed
52
- on your machine, and if not, install it. The official python builds
53
- are available for download `here <http://www.python.org/download>`_,
54
- but OS X users please read :ref:`which-python-for-osx`.
55
-
56
- Once you have Python up and running, you will need to install `numpy
57
- <http://www.numpy.org/>`_. numpy provides high-performance array data
58
- structures and mathematical functions, and is a requirement for
59
- matplotlib. You can test your progress::
60
-
61
- >>> import numpy
62
- >>> print numpy.__version__
63
-
64
- matplotlib requires numpy version |minimum_numpy_version| or later.
65
- Although it is not a requirement to use matplotlib, we strongly
66
- encourage you to install `ipython <http://ipython.org>`_, which is an
67
- interactive shell for python that is matplotlib-aware.
68
-
69
- Next, we need to get matplotlib installed. We provide prebuilt
70
- binaries for OS X and Windows on the matplotlib `download
71
- <http://matplotlib.org/downloads.html>`_. Click on
72
- the latest release of the "matplotlib" package, choose your python
73
- version (2.6, 2.7, 3.3, or 3.4) and your platform (macosx or win32). If you
74
- have any problems, please check the :ref:`installing-faq`, search
75
- using Google, and/or post a question the `mailing list
76
- <http://sourceforge.net/project/showfiles.php?group_id=80706>`_.
77
-
78
- If you are on Debian/Ubuntu linux, it suffices to do::
48
+ See :ref:`install_osx_binaries`.
79
49
80
- > sudo apt-get install python-matplotlib
81
50
82
- Instructions for installing our OSX binaries are found in the FAQ
83
- :ref:`install_osx_binaries`.
84
-
85
-
86
- Once you have ipython, numpy and matplotlib installed, you can use
87
- ipython's "pylab" mode to have a MATLAB-like environment that automatically
88
- handles most of the configuration details for you, so you can get up
89
- and running quickly::
90
-
91
- johnh@flag:~> ipython -pylab
92
- Python 2.4.5 (#4, Apr 12 2008, 09:09:16)
93
- IPython 0.9.0 -- An enhanced Interactive Python.
94
-
95
- Welcome to pylab, a matplotlib-based Python environment.
96
- For more information, type 'help(pylab)'.
97
-
98
- In [1]: x = randn(10000)
99
-
100
- In [2]: hist(x, 100)
101
-
102
- Note that when testing matplotlib installations from the interactive
103
- python console, there are some issues relating to user interface
104
- toolkits and interactive settings that are discussed in
105
- :ref:`mpl-shell`.
106
-
107
- Installing on Windows
108
- ---------------------
51
+ Windows
52
+ -------
109
53
110
54
If you don't already have Python installed, we recommend using
111
55
one of the `scipy-stack compatible Python distributions
@@ -175,6 +119,8 @@ sys.prefix\Lib\site-packages\mpl_toolkits respectively, and install
175
119
Pillow, MiKTeX, GhostScript, ffmpeg, avconv, mencoder, ImageMagick, and
176
120
`Inkscape <http://inkscape.org/>`_.
177
121
122
+
123
+
178
124
.. _install_from_source:
179
125
180
126
Installing from source
@@ -213,31 +159,19 @@ e.g., if the header to some required library is in
213
159
.. _install_requirements:
214
160
215
161
Build requirements
216
- ==================
162
+ ------------------
217
163
218
164
These are external packages which you will need to install before
219
165
installing matplotlib. If you are building on OSX, see
220
166
:ref:`build_osx`. If you are installing dependencies with a package
221
167
manager on Linux, you may need to install the development packages
222
168
(look for a "-dev" postfix) in addition to the libraries themselves.
223
169
224
- .. note::
225
-
226
- If you are on Debian/Ubuntu, you can get all the dependencies
227
- required to build matplotlib with::
228
-
229
- sudo apt-get build-dep python-matplotlib
230
-
231
- If you are on Fedora/RedHat, you can get all the dependencies
232
- required to build matplotlib by first installing ``yum-builddep``
233
- and then running::
234
-
235
- su -c "yum-builddep python-matplotlib"
236
170
237
- This does not build matplotlib, but it does get the install the
238
- build dependencies, which will make building from source easier.
171
+ Required Dependencies
172
+ ^^^^^^^^^^^^^^^^^^^^^
239
173
240
- :term:`python` 2.6, 2.7, 3.1 or 3.2
174
+ :term:`python` 2.6, 2.7, 3.3 or 3.4
241
175
`Download python <http://www.python.org/download/>`_.
242
176
243
177
:term:`numpy` |minimum_numpy_version| (or later)
@@ -267,7 +201,8 @@ libpng 1.2 (or later)
267
201
build support into the matplotlib single-click installer
268
202
269
203
270
- **Optional GUI frameworks**
204
+ Optional GUI framework
205
+ ^^^^^^^^^^^^^^^^^^^^^^
271
206
272
207
These are optional packages which you may want to install to use
273
208
matplotlib with a user interface toolkit. See
@@ -288,29 +223,29 @@ backends and the capabilities they provide.
288
223
The python wrappers for the wx widgets library for use with the
289
224
WX or WXAgg backend
290
225
291
- ** Optional external programs**
292
-
226
+ Optional external programs
227
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
293
228
ffmpeg/avconv or mencoder
294
229
Required for the animation module to be save out put to movie
295
230
formats.
296
231
297
232
ImageMagick
298
233
Required for the animation module to be able to save to animated gif.
299
234
300
- **Optional dependencies**
235
+ Optional dependencies
236
+ ^^^^^^^^^^^^^^^^^^^^^
301
237
302
238
`Pillow http://python-imaging.github.io/`__
303
239
If Pillow is installed, matplotlib can read and write a larger
304
240
selection of image file formats.
305
241
306
242
307
243
:term:`freetype` 1.4 (or later)
308
- library for reading true type font files. If you are a windows
309
- user, you can ignore this since we build support into the
310
- matplotlib single click installer.
244
+ library for reading true type font files.
311
245
312
- **Required libraries that ship with matplotlib**
313
246
247
+ Required libraries that ship with matplotlib
248
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
314
249
:term:`agg` 2.4
315
250
The antigrain C++ rendering engine. matplotlib links against the
316
251
agg template source statically, so it will not affect anything on
@@ -326,14 +261,46 @@ ImageMagick
326
261
`ttconv`
327
262
truetype font utility
328
263
264
+ .. _build_linux:
265
+
266
+ Building on Linux
267
+ -----------------
268
+
269
+ It is easiest to use your system package manager to install the dependencies.
270
+
271
+ If you are on Debian/Ubuntu, you can get all the dependencies
272
+ required to build matplotlib with::
273
+
274
+ sudo apt-get build-dep python-matplotlib
275
+
276
+ If you are on Fedora/RedHat, you can get all the dependencies required
277
+ to build matplotlib by first installing ``yum-builddep`` and then
278
+ running::
279
+
280
+ su -c "yum-builddep python-matplotlib"
281
+
282
+ This does not build matplotlib, but it does get the install the
283
+ build dependencies, which will make building from source easier.
284
+
285
+
329
286
.. _build_osx:
330
287
331
288
Building on OSX
332
- ===============
289
+ ---------------
333
290
334
291
The build situation on OSX is complicated by the various places one
335
292
can get the libpng and freetype requirements (darwinports, fink,
336
293
/usr/X11R6) and the different architectures (e.g., x86, ppc, universal) and
337
294
the different OSX version (e.g., 10.4 and 10.5). We recommend that you build
338
295
the way we do for the OSX release: get the source from the tarball or the
339
296
git repository and follow the instruction in :file:`README.osx`.
297
+
298
+ .. _build_osx:
299
+
300
+ Building on Windows
301
+ -------------------
302
+
303
+ Building for source on windows can be difficult. Please see
304
+ `matplotlib-windbuild
305
+ <https://github.com/jbmohler/matplotlib-winbuild>`_ for detailed
306
+ instructions, dependency source blobs, and helper scripts.
0 commit comments