1
+ .. The source of this document is INSTALL. During the doc build process,
2
+ .. this file is copied over to doc/users/installing.rst.
3
+ .. Therefore, you must edit INSTALL, *not* doc/users/installing.rst!
4
+
1
5
**********
2
6
Installing
3
7
**********
4
8
5
- There are lots of different ways to install matplotlib, and the best
9
+ There are many different ways to install matplotlib, and the best
6
10
way depends on what operating system you are using, what you already
7
11
have installed, and how you want to use it. To avoid wading through
8
12
all the details (and potential complications) on this page, the
@@ -15,14 +19,16 @@ Another excellent alternative for Windows users is `Python (x, y)
15
19
<http://www.pythonxy.com/foreword.php>`_ which tends to be updated a
16
20
bit more frequently. Both of these packages include matplotlib and
17
21
pylab, and *lots* of other useful tools. matplotlib is also packaged
18
- for almost every major linux distribution. So if you are on linux ,
22
+ for almost every major Linux distribution. So if you are on Linux ,
19
23
your package manager will probably provide matplotlib prebuilt.
20
24
21
- One single click installer and you are done.
22
25
23
26
Manually installing pre-built packages
24
27
======================================
25
28
29
+ General instructions
30
+ --------------------
31
+
26
32
For some people, the prepackaged pythons discussed above are not an
27
33
option. That's OK, it's usually pretty easy to get a custom install
28
34
working. You will first need to find out if you have python installed
@@ -48,21 +54,21 @@ Next, we need to get matplotlib installed. We provide prebuilt
48
54
binaries for OS X and Windows on the matplotlib `download
49
55
<http://sourceforge.net/projects/matplotlib/files/>`_ page. Click on
50
56
the latest release of the "matplotlib" package, choose your python
51
- version (2.5, 2.6 or 2.7) and your platform (macosx or win32) and you
52
- should be good to go. If you have any problems, please check the
53
- :ref:`installing-faq`, google around a little bit , and post a question
54
- the `mailing list
55
- <http://sourceforge.net/project/showfiles.php?group_id=80706>`_. If
56
- you are on debian/ubuntu linux , it suffices to do::
57
+ version (e.g., 2.5, 2.6 or 2.7) and your platform (macosx or win32).
58
+ If you have any problems, please check the :ref:`installing-faq`,
59
+ search using Google , and/or post a question to the `mailing list
60
+ <http://sourceforge.net/project/showfiles.php?group_id=80706>`_.
61
+
62
+ If you are on Debian/Ubuntu Linux , it suffices to do::
57
63
58
64
> sudo apt-get install python-matplotlib
59
65
60
66
Instructions for installing our OSX binaries are found in the FAQ
61
67
:ref:`install_osx_binaries`.
62
68
63
69
64
- Once you have ipython, numpy and matplotlib installed, in ipython's
65
- "pylab" mode you have a MATLAB-like environment that automatically
70
+ Once you have ipython, numpy and matplotlib installed, you can use
71
+ ipython's "pylab" mode to have a MATLAB-like environment that automatically
66
72
handles most of the configuration details for you, so you can get up
67
73
and running quickly::
68
74
@@ -86,9 +92,9 @@ Installing on Windows
86
92
---------------------
87
93
88
94
If you don't already have python installed, you may want to consider
89
- using the enthought edition of python, which has scipy, numpy, and
90
- wxpython, plus a lot of other goodies , preinstalled - `Enthought
91
- Python <http://www.enthought.com/python>`_. With the enthought
95
+ using the Enthought edition of python, which has scipy, numpy, and
96
+ wxpython, plus many other useful packages , preinstalled - `Enthought
97
+ Python <http://www.enthought.com/python>`_. With the Enthought
92
98
edition of python + matplotlib installer, the following backends
93
99
should work out of the box: agg, wx, wxagg, tkagg, ps, pdf and svg.
94
100
@@ -99,13 +105,14 @@ http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71 or other
99
105
sites. You will need to unzip the archive and drag the dll into
100
106
:file:`c:\windows\system32`.
101
107
102
- All of the GUI backends run on windows , but TkAgg is probably the
108
+ All of the GUI backends run on Windows , but TkAgg is probably the
103
109
best for interactive use from the standard python shell or ipython.
104
- The windows installer (:file:`*.exe`) on the download page contains all the
110
+ The Windows installer (:file:`*.exe`) on the download page contains all the
105
111
code you need to get up and running. However, there are many
106
- examples that are not included in the windows installer. If you
107
- want to try the many demos that come in the matplotlib src
108
- distribution, download the zip file and look in the examples subdir.
112
+ examples that are not included in the Windows installer. If you
113
+ want to try the many demos that come in the matplotlib source
114
+ distribution, download the zip file and look in the :file:`examples`
115
+ subdirectory.
109
116
110
117
.. _install_from_source:
111
118
@@ -121,17 +128,16 @@ you want to develop matplotlib or just need the latest bugfixed
121
128
version, grab the latest git version :ref:`install-from-git`.
122
129
123
130
Once you have satisfied the requirements detailed below (mainly
124
- python, numpy, libpng and freetype), you build matplotlib in the usual
125
- way::
131
+ python, numpy, libpng and freetype), you can build matplotlib::
126
132
127
133
cd matplotlib
128
134
python setup.py build
129
135
python setup.py install
130
136
131
137
We provide a `setup.cfg
132
138
<https://github.com/matplotlib/matplotlib/raw/master/setup.cfg.template>`_
133
- file that lives along :file:`setup.py` which you can use to customize
134
- the build process, for example, which default backend to use, whether
139
+ file that goes with :file:`setup.py` which you can use to customize
140
+ the build process. For example, which default backend to use, whether
135
141
some of the optional libraries that matplotlib ships with are
136
142
installed, and so on. This file will be particularly useful to those
137
143
packaging matplotlib.
@@ -150,10 +156,10 @@ Build requirements
150
156
151
157
These are external packages which you will need to install before
152
158
installing matplotlib. Windows users only need the first two (python
153
- and numpy) since the others are built into the matplotlib windows
159
+ and numpy) since the others are built into the matplotlib Windows
154
160
installers available for download at the sourceforge site. If you are
155
161
building on OSX, see :ref:`build_osx`. If you are installing
156
- dependencies with a package manager, you may need to install the
162
+ dependencies with a package manager on Linux , you may need to install the
157
163
development packages (look for a "-dev" postfix) in addition to the
158
164
libraries themselves.
159
165
@@ -183,8 +189,8 @@ libraries themselves.
183
189
libpng 1.2 (or later)
184
190
library for loading and saving :term:`PNG` files (`download
185
191
<http://www.libpng.org/pub/png/libpng.html>`__). libpng requires
186
- zlib. If you are a windows user, you can ignore this since we
187
- build support into the matplotlib single click installer
192
+ zlib. If you are a Windows user, you can ignore this because we
193
+ build support into the matplotlib single- click installer
188
194
189
195
:term:`freetype` 1.4 (or later)
190
196
library for reading true type font files. If you are a windows
@@ -196,7 +202,7 @@ libpng 1.2 (or later)
196
202
These are optional packages which you may want to install to use
197
203
matplotlib with a user interface toolkit. See
198
204
:ref:`what-is-a-backend` for more details on the optional matplotlib
199
- backends and the capabilities they provide
205
+ backends and the capabilities they provide.
200
206
201
207
:term:`tk` 8.3 or later
202
208
The TCL/Tk widgets library used by the TkAgg backend
@@ -243,13 +249,9 @@ Building on OSX
243
249
===============
244
250
245
251
The build situation on OSX is complicated by the various places one
246
- can get the png and freetype requirements from (darwinports, fink,
247
- /usr/X11R6) and the different architectures (x86, ppc, universal) and
248
- the different OSX version (10.4 and 10.5). We recommend that you build
249
- the way we do for the OSX release: by grabbing the tarbar or git
250
- repository, cd-ing into the release/osx dir, and following the
251
- instruction in the README. This directory has a Makefile which will
252
- automatically grab the zlib, png and freetype dependencies from the
253
- web, build them with the right flags to make universal libraries, and
254
- then build the matplotlib source and binary installers.
252
+ can get the libpng and freetype requirements (darwinports, fink,
253
+ /usr/X11R6) and the different architectures (e.g., x86, ppc, universal) and
254
+ the different OSX version (e.g., 10.4 and 10.5). We recommend that you build
255
+ the way we do for the OSX release: get the source from the tarball or the
256
+ git repository and follow the instruction in :file:`README.osx`.
255
257
0 commit comments