##// END OF EJS Templates
Add note about libedit on OS X. Closes gh-150.
Fernando Perez -
Show More
@@ -1,349 +1,357
1 Overview
1 Overview
2 ========
2 ========
3
3
4 This document describes the steps required to install IPython. IPython is
4 This document describes the steps required to install IPython. IPython is
5 organized into a number of subpackages, each of which has its own dependencies.
5 organized into a number of subpackages, each of which has its own dependencies.
6 All of the subpackages come with IPython, so you don't need to download and
6 All of the subpackages come with IPython, so you don't need to download and
7 install them separately. However, to use a given subpackage, you will need to
7 install them separately. However, to use a given subpackage, you will need to
8 install all of its dependencies.
8 install all of its dependencies.
9
9
10
10
11 Please let us know if you have problems installing IPython or any of its
11 Please let us know if you have problems installing IPython or any of its
12 dependencies. Officially, IPython requires Python version 2.5 or 2.6. We
12 dependencies. Officially, IPython requires Python version 2.5 or 2.6. We
13 have *not* yet started to port IPython to Python 3.0.
13 have *not* yet started to port IPython to Python 3.0.
14
14
15 .. warning::
15 .. warning::
16
16
17 Officially, IPython supports Python versions 2.5 and 2.6.
17 Officially, IPython supports Python versions 2.5 and 2.6.
18
18
19 IPython 0.10 has only been well tested with Python 2.5 and 2.6. Parts of
19 IPython 0.10 has only been well tested with Python 2.5 and 2.6. Parts of
20 it may work with Python 2.4, but we do not officially support Python 2.4
20 it may work with Python 2.4, but we do not officially support Python 2.4
21 anymore. If you need to use 2.4, you can still run IPython 0.9.
21 anymore. If you need to use 2.4, you can still run IPython 0.9.
22
22
23 Some of the installation approaches use the :mod:`setuptools` package and its
23 Some of the installation approaches use the :mod:`setuptools` package and its
24 :command:`easy_install` command line program. In many scenarios, this provides
24 :command:`easy_install` command line program. In many scenarios, this provides
25 the most simple method of installing IPython and its dependencies. It is not
25 the most simple method of installing IPython and its dependencies. It is not
26 required though. More information about :mod:`setuptools` can be found on its
26 required though. More information about :mod:`setuptools` can be found on its
27 website.
27 website.
28
28
29 More general information about installing Python packages can be found in
29 More general information about installing Python packages can be found in
30 Python's documentation at http://www.python.org/doc/.
30 Python's documentation at http://www.python.org/doc/.
31
31
32 Quickstart
32 Quickstart
33 ==========
33 ==========
34
34
35 If you have :mod:`setuptools` installed and you are on OS X or Linux (not
35 If you have :mod:`setuptools` installed and you are on OS X or Linux (not
36 Windows), the following will download and install IPython *and* the main
36 Windows), the following will download and install IPython *and* the main
37 optional dependencies:
37 optional dependencies:
38
38
39 .. code-block:: bash
39 .. code-block:: bash
40
40
41 $ easy_install ipython[kernel,security,test]
41 $ easy_install ipython[kernel,security,test]
42
42
43 This will get Twisted, zope.interface and Foolscap, which are needed for
43 This will get Twisted, zope.interface and Foolscap, which are needed for
44 IPython's parallel computing features as well as the nose package, which will
44 IPython's parallel computing features as well as the nose package, which will
45 enable you to run IPython's test suite.
45 enable you to run IPython's test suite.
46
46
47 .. warning::
47 .. warning::
48
48
49 IPython's test system is being refactored and currently the
49 IPython's test system is being refactored and currently the
50 :command:`iptest` shown below does not work. More details about the
50 :command:`iptest` shown below does not work. More details about the
51 testing situation can be found :ref:`here <testing>`
51 testing situation can be found :ref:`here <testing>`
52
52
53 To run IPython's test suite, use the :command:`iptest` command:
53 To run IPython's test suite, use the :command:`iptest` command:
54
54
55 .. code-block:: bash
55 .. code-block:: bash
56
56
57 $ iptest
57 $ iptest
58
58
59 Read on for more specific details and instructions for Windows.
59 Read on for more specific details and instructions for Windows.
60
60
61 Installing IPython itself
61 Installing IPython itself
62 =========================
62 =========================
63
63
64 Given a properly built Python, the basic interactive IPython shell will work
64 Given a properly built Python, the basic interactive IPython shell will work
65 with no external dependencies. However, some Python distributions
65 with no external dependencies. However, some Python distributions
66 (particularly on Windows and OS X), don't come with a working :mod:`readline`
66 (particularly on Windows and OS X), don't come with a working :mod:`readline`
67 module. The IPython shell will work without :mod:`readline`, but will lack
67 module. The IPython shell will work without :mod:`readline`, but will lack
68 many features that users depend on, such as tab completion and command line
68 many features that users depend on, such as tab completion and command line
69 editing. See below for details of how to make sure you have a working
69 editing. See below for details of how to make sure you have a working
70 :mod:`readline`.
70 :mod:`readline`.
71
71
72 Installation using easy_install
72 Installation using easy_install
73 -------------------------------
73 -------------------------------
74
74
75 If you have :mod:`setuptools` installed, the easiest way of getting IPython is
75 If you have :mod:`setuptools` installed, the easiest way of getting IPython is
76 to simple use :command:`easy_install`:
76 to simple use :command:`easy_install`:
77
77
78 .. code-block:: bash
78 .. code-block:: bash
79
79
80 $ easy_install ipython
80 $ easy_install ipython
81
81
82 That's it.
82 That's it.
83
83
84 Installation from source
84 Installation from source
85 ------------------------
85 ------------------------
86
86
87 If you don't want to use :command:`easy_install`, or don't have it installed,
87 If you don't want to use :command:`easy_install`, or don't have it installed,
88 just grab the latest stable build of IPython from `here
88 just grab the latest stable build of IPython from `here
89 <http://ipython.scipy.org/dist/>`_. Then do the following:
89 <http://ipython.scipy.org/dist/>`_. Then do the following:
90
90
91 .. code-block:: bash
91 .. code-block:: bash
92
92
93 $ tar -xzf ipython.tar.gz
93 $ tar -xzf ipython.tar.gz
94 $ cd ipython
94 $ cd ipython
95 $ python setup.py install
95 $ python setup.py install
96
96
97 If you are installing to a location (like ``/usr/local``) that requires higher
97 If you are installing to a location (like ``/usr/local``) that requires higher
98 permissions, you may need to run the last command with :command:`sudo`.
98 permissions, you may need to run the last command with :command:`sudo`.
99
99
100 Windows
100 Windows
101 -------
101 -------
102
102
103 There are a few caveats for Windows users. The main issue is that a basic
103 There are a few caveats for Windows users. The main issue is that a basic
104 ``python setup.py install`` approach won't create ``.bat`` file or Start Menu
104 ``python setup.py install`` approach won't create ``.bat`` file or Start Menu
105 shortcuts, which most users want. To get an installation with these, you can
105 shortcuts, which most users want. To get an installation with these, you can
106 use any of the following alternatives:
106 use any of the following alternatives:
107
107
108 1. Install using :command:`easy_install`.
108 1. Install using :command:`easy_install`.
109
109
110 2. Install using our binary ``.exe`` Windows installer, which can be found at
110 2. Install using our binary ``.exe`` Windows installer, which can be found at
111 `here <http://ipython.scipy.org/dist/>`_
111 `here <http://ipython.scipy.org/dist/>`_
112
112
113 3. Install from source, but using :mod:`setuptools` (``python setupegg.py
113 3. Install from source, but using :mod:`setuptools` (``python setupegg.py
114 install``).
114 install``).
115
115
116 IPython by default runs in a terminal window, but the normal terminal
116 IPython by default runs in a terminal window, but the normal terminal
117 application supplied by Microsoft Windows is very primitive. You may want to
117 application supplied by Microsoft Windows is very primitive. You may want to
118 download the excellent and free Console_ application instead, which is a far
118 download the excellent and free Console_ application instead, which is a far
119 superior tool. You can even configure Console to give you by default an
119 superior tool. You can even configure Console to give you by default an
120 IPython tab, which is very convenient to create new IPython sessions directly
120 IPython tab, which is very convenient to create new IPython sessions directly
121 from the working terminal.
121 from the working terminal.
122
122
123 .. _Console: http://sourceforge.net/projects/console
123 .. _Console: http://sourceforge.net/projects/console
124
124
125 Note for Windows 64 bit users: you may have difficulties with the stock
125 Note for Windows 64 bit users: you may have difficulties with the stock
126 installer on 64 bit systems; in this case (since we currently do not have 64
126 installer on 64 bit systems; in this case (since we currently do not have 64
127 bit builds of the Windows installer) your best bet is to install from source
127 bit builds of the Windows installer) your best bet is to install from source
128 with the setuptools method indicated in #3 above. See `this bug report`_ for
128 with the setuptools method indicated in #3 above. See `this bug report`_ for
129 further details.
129 further details.
130
130
131 .. _this bug report: https://bugs.launchpad.net/ipython/+bug/382214
131 .. _this bug report: https://bugs.launchpad.net/ipython/+bug/382214
132
132
133
133
134 Installing the development version
134 Installing the development version
135 ----------------------------------
135 ----------------------------------
136
136
137 It is also possible to install the development version of IPython from our
137 It is also possible to install the development version of IPython from our
138 `Bazaar <http://bazaar-vcs.org/>`_ source code repository. To do this you will
138 `Bazaar <http://bazaar-vcs.org/>`_ source code repository. To do this you will
139 need to have Bazaar installed on your system. Then just do:
139 need to have Bazaar installed on your system. Then just do:
140
140
141 .. code-block:: bash
141 .. code-block:: bash
142
142
143 $ bzr branch lp:ipython
143 $ bzr branch lp:ipython
144 $ cd ipython
144 $ cd ipython
145 $ python setup.py install
145 $ python setup.py install
146
146
147 Again, this last step on Windows won't create ``.bat`` files or Start Menu
147 Again, this last step on Windows won't create ``.bat`` files or Start Menu
148 shortcuts, so you will have to use one of the other approaches listed above.
148 shortcuts, so you will have to use one of the other approaches listed above.
149
149
150 Some users want to be able to follow the development branch as it changes. If
150 Some users want to be able to follow the development branch as it changes. If
151 you have :mod:`setuptools` installed, this is easy. Simply replace the last
151 you have :mod:`setuptools` installed, this is easy. Simply replace the last
152 step by:
152 step by:
153
153
154 .. code-block:: bash
154 .. code-block:: bash
155
155
156 $ python setupegg.py develop
156 $ python setupegg.py develop
157
157
158 This creates links in the right places and installs the command line script to
158 This creates links in the right places and installs the command line script to
159 the appropriate places. Then, if you want to update your IPython at any time,
159 the appropriate places. Then, if you want to update your IPython at any time,
160 just do:
160 just do:
161
161
162 .. code-block:: bash
162 .. code-block:: bash
163
163
164 $ bzr pull
164 $ bzr pull
165
165
166 Basic optional dependencies
166 Basic optional dependencies
167 ===========================
167 ===========================
168
168
169 There are a number of basic optional dependencies that most users will want to
169 There are a number of basic optional dependencies that most users will want to
170 get. These are:
170 get. These are:
171
171
172 * readline (for command line editing, tab completion, etc.)
172 * readline (for command line editing, tab completion, etc.)
173 * nose (to run the IPython test suite)
173 * nose (to run the IPython test suite)
174 * pexpect (to use things like irunner)
174 * pexpect (to use things like irunner)
175
175
176 If you are comfortable installing these things yourself, have at it, otherwise
176 If you are comfortable installing these things yourself, have at it, otherwise
177 read on for more details.
177 read on for more details.
178
178
179 readline
179 readline
180 --------
180 --------
181
181
182 In principle, all Python distributions should come with a working
182 In principle, all Python distributions should come with a working
183 :mod:`readline` module. But, reality is not quite that simple. There are two
183 :mod:`readline` module. But, reality is not quite that simple. There are two
184 common situations where you won't have a working :mod:`readline` module:
184 common situations where you won't have a working :mod:`readline` module:
185
185
186 * If you are using the built-in Python on Mac OS X.
186 * If you are using the built-in Python on Mac OS X.
187
187
188 * If you are running Windows, which doesn't have a :mod:`readline` module.
188 * If you are running Windows, which doesn't have a :mod:`readline` module.
189
189
190
190 On OS X, the built-in Python doesn't not have :mod:`readline` because of
191 On OS X, the built-in Python doesn't not have :mod:`readline` because of
191 license issues. Starting with OS X 10.5 (Leopard), Apple's built-in Python has
192 license issues. Starting with OS X 10.5 (Leopard), Apple's built-in Python has
192 a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9,
193 a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9,
193 many of the issues related to the differences between readline and libedit have
194 many of the issues related to the differences between readline and libedit seem
194 been resolved. For many users, libedit may be sufficient.
195 to have been resolved. While you may find libedit sufficient, we have
196 occasional reports of bugs with it and several developers who use OS X as their
197 main environment consider libedit unacceptable for productive, regular use with
198 IPython.
199
200 Therefore, we *strongly* recommend that on OS X you get the full
201 :mod:`readline` module. We will *not* consider completion/history problems to
202 be bugs for IPython if you are using libedit.
195
203
196 Most users on OS X will want to get the full :mod:`readline` module. To get a
204 To get a working :mod:`readline` module, just do (with :mod:`setuptools`
197 working :mod:`readline` module, just do (with :mod:`setuptools` installed):
205 installed):
198
206
199 .. code-block:: bash
207 .. code-block:: bash
200
208
201 $ easy_install readline
209 $ easy_install readline
202
210
203 .. note::
211 .. note::
204
212
205 Other Python distributions on OS X (such as fink, MacPorts and the
213 Other Python distributions on OS X (such as fink, MacPorts and the official
206 official python.org binaries) already have readline installed so
214 python.org binaries) already have readline installed so you likely don't
207 you don't have to do this step.
215 have to do this step.
208
216
209 If needed, the readline egg can be build and installed from source (see the
217 If needed, the readline egg can be build and installed from source (see the
210 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard).
218 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard).
211
219
212 On Windows, you will need the PyReadline module. PyReadline is a separate,
220 On Windows, you will need the PyReadline module. PyReadline is a separate,
213 Windows only implementation of readline that uses native Windows calls through
221 Windows only implementation of readline that uses native Windows calls through
214 :mod:`ctypes`. The easiest way of installing PyReadline is you use the binary
222 :mod:`ctypes`. The easiest way of installing PyReadline is you use the binary
215 installer available `here <http://ipython.scipy.org/dist/>`_. The :mod:`ctypes`
223 installer available `here <http://ipython.scipy.org/dist/>`_. The :mod:`ctypes`
216 module, which comes with Python 2.5 and greater, is required by PyReadline. It
224 module, which comes with Python 2.5 and greater, is required by PyReadline. It
217 is available for Python 2.4 at http://python.net/crew/theller/ctypes.
225 is available for Python 2.4 at http://python.net/crew/theller/ctypes.
218
226
219 nose
227 nose
220 ----
228 ----
221
229
222 To run the IPython test suite you will need the :mod:`nose` package. Nose
230 To run the IPython test suite you will need the :mod:`nose` package. Nose
223 provides a great way of sniffing out and running all of the IPython tests. The
231 provides a great way of sniffing out and running all of the IPython tests. The
224 simplest way of getting nose, is to use :command:`easy_install`:
232 simplest way of getting nose, is to use :command:`easy_install`:
225
233
226 .. code-block:: bash
234 .. code-block:: bash
227
235
228 $ easy_install nose
236 $ easy_install nose
229
237
230 Another way of getting this is to do:
238 Another way of getting this is to do:
231
239
232 .. code-block:: bash
240 .. code-block:: bash
233
241
234 $ easy_install ipython[test]
242 $ easy_install ipython[test]
235
243
236 For more installation options, see the `nose website
244 For more installation options, see the `nose website
237 <http://somethingaboutorange.com/mrl/projects/nose/>`_.
245 <http://somethingaboutorange.com/mrl/projects/nose/>`_.
238
246
239 .. warning::
247 .. warning::
240
248
241 As described above, the :command:`iptest` command currently doesn't work.
249 As described above, the :command:`iptest` command currently doesn't work.
242
250
243 Once you have nose installed, you can run IPython's test suite using the
251 Once you have nose installed, you can run IPython's test suite using the
244 iptest command:
252 iptest command:
245
253
246 .. code-block:: bash
254 .. code-block:: bash
247
255
248 $ iptest
256 $ iptest
249
257
250 pexpect
258 pexpect
251 -------
259 -------
252
260
253 The `pexpect <http://www.noah.org/wiki/Pexpect>`_ package is used in IPython's
261 The `pexpect <http://www.noah.org/wiki/Pexpect>`_ package is used in IPython's
254 :command:`irunner` script. On Unix platforms (including OS X), just do:
262 :command:`irunner` script. On Unix platforms (including OS X), just do:
255
263
256 .. code-block:: bash
264 .. code-block:: bash
257
265
258 $ easy_install pexpect
266 $ easy_install pexpect
259
267
260 Windows users are out of luck as pexpect does not run there.
268 Windows users are out of luck as pexpect does not run there.
261
269
262 Dependencies for IPython.kernel (parallel computing)
270 Dependencies for IPython.kernel (parallel computing)
263 ====================================================
271 ====================================================
264
272
265 The IPython kernel provides a nice architecture for parallel computing. The
273 The IPython kernel provides a nice architecture for parallel computing. The
266 main focus of this architecture is on interactive parallel computing. These
274 main focus of this architecture is on interactive parallel computing. These
267 features require a number of additional packages:
275 features require a number of additional packages:
268
276
269 * zope.interface (yep, we use interfaces)
277 * zope.interface (yep, we use interfaces)
270 * Twisted (asynchronous networking framework)
278 * Twisted (asynchronous networking framework)
271 * Foolscap (a nice, secure network protocol)
279 * Foolscap (a nice, secure network protocol)
272 * pyOpenSSL (security for network connections)
280 * pyOpenSSL (security for network connections)
273
281
274 On a Unix style platform (including OS X), if you want to use
282 On a Unix style platform (including OS X), if you want to use
275 :mod:`setuptools`, you can just do:
283 :mod:`setuptools`, you can just do:
276
284
277 .. code-block:: bash
285 .. code-block:: bash
278
286
279 $ easy_install ipython[kernel] # the first three
287 $ easy_install ipython[kernel] # the first three
280 $ easy_install ipython[security] # pyOpenSSL
288 $ easy_install ipython[security] # pyOpenSSL
281
289
282 zope.interface and Twisted
290 zope.interface and Twisted
283 --------------------------
291 --------------------------
284
292
285 Twisted [Twisted]_ and zope.interface [ZopeInterface]_ are used for networking
293 Twisted [Twisted]_ and zope.interface [ZopeInterface]_ are used for networking
286 related things. On Unix style platforms (including OS X), the simplest way of
294 related things. On Unix style platforms (including OS X), the simplest way of
287 getting the these is to use :command:`easy_install`:
295 getting the these is to use :command:`easy_install`:
288
296
289 .. code-block:: bash
297 .. code-block:: bash
290
298
291 $ easy_install zope.interface
299 $ easy_install zope.interface
292 $ easy_install Twisted
300 $ easy_install Twisted
293
301
294 Of course, you can also download the source tarballs from the Twisted website
302 Of course, you can also download the source tarballs from the Twisted website
295 [Twisted]_ and the
303 [Twisted]_ and the
296 `zope.interface page at PyPI <http://pypi.python.org/pypi/zope.interface>`_
304 `zope.interface page at PyPI <http://pypi.python.org/pypi/zope.interface>`_
297 and do the usual ``python setup.py install`` if you prefer.
305 and do the usual ``python setup.py install`` if you prefer.
298
306
299 Windows is a bit different. For zope.interface and Twisted, simply get the
307 Windows is a bit different. For zope.interface and Twisted, simply get the
300 latest binary ``.exe`` installer from the Twisted website. This installer
308 latest binary ``.exe`` installer from the Twisted website. This installer
301 includes both zope.interface and Twisted and should just work.
309 includes both zope.interface and Twisted and should just work.
302
310
303 Foolscap
311 Foolscap
304 --------
312 --------
305
313
306 Foolscap [Foolscap]_ uses Twisted to provide a very nice secure RPC protocol that we use to implement our parallel computing features.
314 Foolscap [Foolscap]_ uses Twisted to provide a very nice secure RPC protocol that we use to implement our parallel computing features.
307
315
308 On all platforms a simple:
316 On all platforms a simple:
309
317
310 .. code-block:: bash
318 .. code-block:: bash
311
319
312 $ easy_install foolscap
320 $ easy_install foolscap
313
321
314 should work. You can also download the source tarballs from the `Foolscap
322 should work. You can also download the source tarballs from the `Foolscap
315 website <http://foolscap.lothar.com/trac>`_ and do ``python setup.py install``
323 website <http://foolscap.lothar.com/trac>`_ and do ``python setup.py install``
316 if you prefer.
324 if you prefer.
317
325
318 pyOpenSSL
326 pyOpenSSL
319 ---------
327 ---------
320
328
321 IPython does not work with version 0.7 of pyOpenSSL [pyOpenSSL]_. It is known
329 IPython does not work with version 0.7 of pyOpenSSL [pyOpenSSL]_. It is known
322 to work with version 0.6 and will likely work with the more recent 0.8 and 0.9
330 to work with version 0.6 and will likely work with the more recent 0.8 and 0.9
323 versions. There are a couple of options for getting this:
331 versions. There are a couple of options for getting this:
324
332
325 1. Most Linux distributions have packages for pyOpenSSL.
333 1. Most Linux distributions have packages for pyOpenSSL.
326 2. The built-in Python 2.5 on OS X 10.5 already has it installed.
334 2. The built-in Python 2.5 on OS X 10.5 already has it installed.
327 3. There are source tarballs on the pyOpenSSL website. On Unix-like
335 3. There are source tarballs on the pyOpenSSL website. On Unix-like
328 platforms, these can be built using ``python seutp.py install``.
336 platforms, these can be built using ``python seutp.py install``.
329 4. There is also a binary ``.exe`` Windows installer on the
337 4. There is also a binary ``.exe`` Windows installer on the
330 `pyOpenSSL website <http://pyopenssl.sourceforge.net/>`_.
338 `pyOpenSSL website <http://pyopenssl.sourceforge.net/>`_.
331
339
332 Dependencies for IPython.frontend (the IPython GUI)
340 Dependencies for IPython.frontend (the IPython GUI)
333 ===================================================
341 ===================================================
334
342
335 wxPython
343 wxPython
336 --------
344 --------
337
345
338 Starting with IPython 0.9, IPython has a new :mod:`IPython.frontend` package
346 Starting with IPython 0.9, IPython has a new :mod:`IPython.frontend` package
339 that has a nice wxPython based IPython GUI. As you would expect, this GUI
347 that has a nice wxPython based IPython GUI. As you would expect, this GUI
340 requires wxPython. Most Linux distributions have wxPython packages available
348 requires wxPython. Most Linux distributions have wxPython packages available
341 and the built-in Python on OS X comes with wxPython preinstalled. For Windows,
349 and the built-in Python on OS X comes with wxPython preinstalled. For Windows,
342 a binary installer is available on the `wxPython website
350 a binary installer is available on the `wxPython website
343 <http://www.wxpython.org/>`_.
351 <http://www.wxpython.org/>`_.
344
352
345 .. [Twisted] Twisted matrix. http://twistedmatrix.org
353 .. [Twisted] Twisted matrix. http://twistedmatrix.org
346 .. [ZopeInterface] http://pypi.python.org/pypi/zope.interface
354 .. [ZopeInterface] http://pypi.python.org/pypi/zope.interface
347 .. [Foolscap] Foolscap network protocol. http://foolscap.lothar.com/trac
355 .. [Foolscap] Foolscap network protocol. http://foolscap.lothar.com/trac
348 .. [pyOpenSSL] pyOpenSSL. http://pyopenssl.sourceforge.net
356 .. [pyOpenSSL] pyOpenSSL. http://pyopenssl.sourceforge.net
349
357
General Comments 0
You need to be logged in to leave comments. Login now