##// END OF EJS Templates
Include pygments in requirements, small doc fixes.
Fernando Perez -
Show More
@@ -1,369 +1,376 b''
1 1 Overview
2 2 ========
3 3
4 4 This document describes the steps required to install IPython. IPython is
5 5 organized into a number of subpackages, each of which has its own dependencies.
6 6 All of the subpackages come with IPython, so you don't need to download and
7 7 install them separately. However, to use a given subpackage, you will need to
8 8 install all of its dependencies.
9 9
10 10 Please let us know if you have problems installing IPython or any of its
11 11 dependencies. Officially, IPython requires Python 2.6, 2.7, 3.1, or 3.2.
12 12
13 13 .. warning::
14 14
15 15 Since version 0.11, IPython has a hard syntax dependency on 2.6, and will no
16 16 longer work on Python <= 2.5. You can find older versions of IPython which
17 17 supported Python <= 2.5 `here <http://archive.ipython.org/release/>`_
18 18
19 19 Some of the installation approaches use the :mod:`distribute` package and its
20 20 :command:`easy_install` command line program. In many scenarios, this provides
21 21 the most simple method of installing IPython and its dependencies. More
22 22 information about :mod:`distribute` can be found on its website.
23 23
24 24 .. note::
25 25
26 26 On Windows, IPython has a hard dependency on :mod:`distribute`. We hope to
27 27 change this in the future, but for now on Windows, you *must* install
28 28 :mod:`distribute`.
29 29
30 30 More general information about installing Python packages can be found in
31 31 `Python's documentation <http://docs.python.org>`_.
32 32
33
33 34 Quickstart
34 35 ==========
35 36
36 37 If you have :mod:`distribute` installed and you are on OS X or Linux (not
37 38 Windows), the following will download and install IPython *and* the main
38 39 optional dependencies:
39 40
40 41 .. code-block:: bash
41 42
42 $ easy_install ipython[zmq,test]
43 $ easy_install ipython[zmq,qtconsole,notebook,test]
44
45 This will get:
43 46
44 This will get pyzmq, which is needed for IPython's parallel computing features
45 as well as the nose package, which will enable you to run IPython's test suite.
47 - pyzmq, needed for IPython's parallel computing features, qt console and
48 notebook.
49 - pygments, used by the Qt console for syntax highlighting.
50 - tornado, needed by the web-based notebook
51 - nose, used by the test suite.
46 52
47 53 To run IPython's test suite, use the :command:`iptest` command:
48 54
49 55 .. code-block:: bash
50 56
51 57 $ iptest
52 58
53 Read on for more specific details and instructions for Windows.
54
59
55 60 Installing IPython itself
56 61 =========================
57 62
58 63 Given a properly built Python, the basic interactive IPython shell will work
59 64 with no external dependencies. However, some Python distributions
60 65 (particularly on Windows and OS X), don't come with a working :mod:`readline`
61 66 module. The IPython shell will work without :mod:`readline`, but will lack
62 67 many features that users depend on, such as tab completion and command line
63 editing. If you install IPython with :mod:`distribute`, (e.g. with `easy_install`),
64 then the appropriate :mod:`readline` for your platform will be installed.
65 See below for details of how to make sure you have a working :mod:`readline`.
68 editing. If you install IPython with :mod:`distribute`, (e.g. with
69 `easy_install`), then the appropriate :mod:`readline` for your platform will be
70 installed. See below for details of how to make sure you have a working
71 :mod:`readline`.
66 72
67 73 Installation using easy_install
68 74 -------------------------------
69 75
70 76 If you have :mod:`distribute` installed, the easiest way of getting IPython is
71 77 to simple use :command:`easy_install`:
72 78
73 79 .. code-block:: bash
74 80
75 81 $ easy_install ipython
76 82
77 83 That's it.
78 84
79 85 Installation from source
80 86 ------------------------
81 87
82 88 If you don't want to use :command:`easy_install`, or don't have it installed,
83 89 just grab the latest stable build of IPython from `here
84 90 <http://ipython.org/download.html>`_. Then do the following:
85 91
86 92 .. code-block:: bash
87 93
88 94 $ tar -xzf ipython.tar.gz
89 95 $ cd ipython
90 96 $ python setup.py install
91 97
92 98 If you are installing to a location (like ``/usr/local``) that requires higher
93 99 permissions, you may need to run the last command with :command:`sudo`.
94 100
95 101 Windows
96 102 -------
97 103
98 104 As mentioned above, on Windows, IPython requires :mod:`distribute`, and it also
99 105 requires the PyReadline library to properly support coloring and keyboard
100 106 management (features that the default windows console doesn't have). So on
101 107 Windows, the installation procedure is:
102 108
103 109 1. Install `distribute <http://pypi.python.org/pypi/distribute>`_.
104 110
105 111 2. Install `pyreadline <http://pypi.python.org/pypi/pyreadline>`_. You can use
106 112 the command ``easy_install pyreadline`` from a terminal, or the binary
107 113 installer appropriate for your platform from the PyPI page.
108 114
109 115 3. Install IPython itself, which you can download from `PyPI
110 116 <http://pypi.python.org/pypi/ipython>`_ or from `our site
111 117 <http://ipython.org/download.html>`_. Note that on Windows 7, you *must*
112 118 right-click and 'Run as administrator' for the Start menu shortcuts to be
113 119 created.
114 120
115 121 IPython by default runs in a terminal window, but the normal terminal
116 122 application supplied by Microsoft Windows is very primitive. You may want to
117 123 download the excellent and free Console_ application instead, which is a far
118 124 superior tool. You can even configure Console to give you by default an
119 125 IPython tab, which is very convenient to create new IPython sessions directly
120 126 from the working terminal.
121 127
122 128 .. _Console: http://sourceforge.net/projects/console
123 129
124 130
125 131 Installing the development version
126 132 ----------------------------------
127 133
128 134 It is also possible to install the development version of IPython from our
129 135 `Git <http://git-scm.com/>`_ source code repository. To do this you will
130 136 need to have Git installed on your system. Then just do:
131 137
132 138 .. code-block:: bash
133 139
134 140 $ git clone https://github.com/ipython/ipython.git
135 141 $ cd ipython
136 142 $ python setup.py install
137 143
138 144 Some users want to be able to follow the development branch as it changes. If
139 145 you have :mod:`distribute` installed, this is easy. Simply replace the last
140 146 step by:
141 147
142 148 .. code-block:: bash
143 149
144 150 $ python setupegg.py develop
145 151
146 152 This creates links in the right places and installs the command line script to
147 153 the appropriate places. Then, if you want to update your IPython at any time,
148 154 just do:
149 155
150 156 .. code-block:: bash
151 157
152 158 $ git pull
153 159
154 160
155 161 Basic optional dependencies
156 162 ===========================
157 163
158 164 There are a number of basic optional dependencies that most users will want to
159 165 get. These are:
160 166
161 167 * readline (for command line editing, tab completion, etc.)
162 168 * nose (to run the IPython test suite)
163 169 * pexpect (to use things like irunner)
164 170
165 171 If you are comfortable installing these things yourself, have at it, otherwise
166 172 read on for more details.
167 173
168 174 readline
169 175 --------
170 176
171 177 As indicated above, on Windows, PyReadline is a *mandatory* dependency.
172 178 PyReadline is a separate, Windows only implementation of readline that uses
173 179 native Windows calls through :mod:`ctypes`. The easiest way of installing
174 180 PyReadline is you use the binary installer available `here
175 181 <http://pypi.python.org/pypi/pyreadline>`_.
176 182
177 183 On OSX, if you are using the built-in Python shipped by Apple, you will be
178 184 missing a full readline implementation as Apple ships instead a library called
179 185 ``libedit`` that provides only some of readline's functionality. While you may
180 186 find libedit sufficient, we have occasional reports of bugs with it and several
181 187 developers who use OS X as their main environment consider libedit unacceptable
182 188 for productive, regular use with IPython.
183 189
184 190 Therefore, we *strongly* recommend that on OS X you get the full
185 191 :mod:`readline` module. We will *not* consider completion/history problems to
186 192 be bugs for IPython if you are using libedit.
187 193
188 194 To get a working :mod:`readline` module, just do (with :mod:`distribute`
189 195 installed):
190 196
191 197 .. code-block:: bash
192 198
193 199 $ easy_install readline
194 200
195 201 .. note::
196 202
197 203 Other Python distributions on OS X (such as fink, MacPorts and the official
198 204 python.org binaries) already have readline installed so you likely don't
199 205 have to do this step.
200 206
201 207 When IPython is installed with :mod:`distribute`, (e.g. using the
202 208 ``easy_install`` command), readline is added as a dependency on OS X, and
203 209 PyReadline on Windows, and will be installed on your system. However, if you
204 210 do not use distribute, you may have to install one of these packages yourself.
205 211
206 212
207 213 nose
208 214 ----
209 215
210 216 To run the IPython test suite you will need the :mod:`nose` package. Nose
211 217 provides a great way of sniffing out and running all of the IPython tests. The
212 218 simplest way of getting nose, is to use :command:`easy_install`:
213 219
214 220 .. code-block:: bash
215 221
216 222 $ easy_install nose
217 223
218 224 Another way of getting this is to do:
219 225
220 226 .. code-block:: bash
221 227
222 228 $ easy_install ipython[test]
223 229
224 230 For more installation options, see the `nose website
225 231 <http://somethingaboutorange.com/mrl/projects/nose/>`_.
226 232
227 233 Once you have nose installed, you can run IPython's test suite using the
228 234 iptest command:
229 235
230 236 .. code-block:: bash
231 237
232 238 $ iptest
233 239
234 240 pexpect
235 241 -------
236 242
237 243 The pexpect_ package is used in IPython's :command:`irunner` script, as well as
238 244 for managing subprocesses. IPython now includes a version of pexpect in
239 245 :mod:`IPython.external`, but if you have installed pexpect, IPython will use
240 246 that instead. On Unix platforms (including OS X), just do:
241 247
242 248 .. code-block:: bash
243 249
244 250 $ easy_install pexpect
245 251
246 252 Windows users are out of luck as pexpect does not run there.
247 253
248 254 Dependencies for IPython.parallel (parallel computing)
249 255 ======================================================
250 256
251 257 :mod:`IPython.kernel` has been replaced by :mod:`IPython.parallel`,
252 258 which uses ZeroMQ for all communication.
253 259
254 260 IPython.parallel provides a nice architecture for parallel computing, with a
255 261 focus on fluid interactive workflows. These features require just one package:
256 262 PyZMQ. See the next section for PyZMQ details.
257 263
258 264 On a Unix style platform (including OS X), if you want to use
259 265 :mod:`distribute`, you can just do:
260 266
261 267 .. code-block:: bash
262 268
263 269 $ easy_install ipython[zmq] # will include pyzmq
264 270
265 271 Security in IPython.parallel is provided by SSH tunnels. By default, Linux
266 272 and OSX clients will use the shell ssh command, but on Windows, we also
267 273 support tunneling with paramiko_.
268 274
269 275 Dependencies for IPython.zmq
270 276 ============================
271 277
272 278 pyzmq
273 279 -----
274 280
275 281 IPython 0.11 introduced some new functionality, including a two-process
276 282 execution model using ZeroMQ_ for communication. The Python bindings to ZeroMQ
277 283 are found in the PyZMQ_ project, which is easy_install-able once you have
278 284 ZeroMQ installed. If you are on Python 2.6 or 2.7 on OSX, or 2.7 on Windows,
279 285 pyzmq has eggs that include ZeroMQ itself.
280 286
281 287 IPython.zmq depends on pyzmq >= 2.1.4.
282 288
283 289 Dependencies for the IPython QT console
284 290 =======================================
285 291
286 292 pyzmq
287 293 -----
288 294
289 295 Like the :mod:`IPython.parallel` package, the QT Console requires ZeroMQ and
290 296 PyZMQ.
291 297
292 298 Qt
293 299 --
294 300
295 301 Also with 0.11, a new GUI was added using the work in :mod:`IPython.zmq`, which
296 302 can be launched with ``ipython qtconsole``. The GUI is built on Qt, and works
297 303 with either PyQt, which can be installed from the `PyQt website
298 304 <http://www.riverbankcomputing.co.uk/>`_, or `PySide
299 305 <http://www.pyside.org/>`_, from Nokia.
300 306
301 307 pygments
302 308 --------
303 309
304 310 The syntax-highlighting in ``ipython qtconsole`` is done with the pygments_
305 311 project, which is easy_install-able.
306 312
307 313 .. _installnotebook:
308 314
309 315 Dependencies for the IPython HTML notebook
310 316 ==========================================
311 317
312 318 The IPython notebook is a notebook-style web interface to IPython and can be
313 319 started withe command ``ipython notebook``.
314 320
315 321 pyzmq
316 322 -----
317 323
318 324 Like the :mod:`IPython.parallel` and :mod:`IPython.frontend.qt.console`
319 325 packages, the HTML notebook requires ZeroMQ and PyZMQ.
320 326
321 327 Tornado
322 328 -------
323 329
324 330 The IPython notebook uses the Tornado_ project for its HTTP server. Tornado 2.1
325 331 is required, in order to support current versions of browsers, due to an update
326 332 to the websocket protocol.
327 333
328 334
329 335 MathJax
330 336 -------
331 337
332 338 The IPython notebook uses the MathJax_ Javascript library for rendering LaTeX
333 339 in web browsers. Because MathJax is large, we don't include it with
334 340 IPython. Normally IPython will load MathJax from a CDN, but if you have a slow
335 341 network connection, or want to use LaTeX without an internet connection at all,
336 342 we do include a utility to aid in downloading MathJax and installing it into
337 343 the proper location::
338 344
339 345 from IPython.external.mathjax import install_mathjax
340 346 install_mathjax()
341 347
342 This function does require write access to the IPython install directory, so if you
343 have a system-wide Python install, it may need to be done from a ``sudo python`` session.
348 This function does require write access to the IPython install directory, so if
349 you have a system-wide Python install, it may need to be done from a ``sudo
350 python`` session.
344 351
345 352 Browser Compatibility
346 353 ---------------------
347 354
348 355 The notebook uses WebSockets and the flexible box model. These features are
349 356 available in the following browsers:
350 357
351 358 * Chrome
352 359 * Safari
353 360 * Firefox 6 and above
354 361 * Firefox 4 and 5: These browsers have WebSocket support, but it is disabled by
355 362 default. If you're unable to upgrade, you can enable it by entering ``about:config``
356 363 in the URL bar and then setting ``network.websocket.enabled`` and
357 364 ``network.websocket.override-security-block`` to ``true``.
358 365
359 366 Internet Explorer 9 does not support WebSockets or the flexible box model, but
360 367 these features should appear in Internet Explorer 10.
361 368
362 369
363 370 .. _ZeroMQ: http://www.zeromq.org
364 371 .. _PyZMQ: https://github.com/zeromq/pyzmq
365 372 .. _paramiko: https://github.com/robey/paramiko
366 373 .. _pygments: http://pygments.org
367 374 .. _pexpect: http://www.noah.org/wiki/Pexpect
368 375 .. _Tornado: http://www.tornadoweb.org
369 376 .. _MathJax: http://www.mathjax.org
General Comments 0
You need to be logged in to leave comments. Login now