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