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