##// END OF EJS Templates
update install doc to reflect 0.11 changes and GitHub move...
MinRK -
Show More
@@ -1,328 +1,332 b''
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.6 or 2.7. There
12 dependencies. Officially, IPython requires Python version 2.6 or 2.7. There
13 is an experimental port of IPython for Python3 `on GitHub
13 is an experimental port of IPython for Python3 `on GitHub
14 <https://github.com/ipython/ipython-py3k>`_
14 <https://github.com/ipython/ipython-py3k>`_
15
15
16 .. warning::
16 .. warning::
17
17
18 Officially, IPython supports Python versions 2.6 and 2.7.
18 Officially, IPython supports Python versions 2.6 and 2.7.
19
19
20 IPython 0.11 has a hard syntax dependency on 2.6, and will no longer work
20 IPython 0.11 has a hard syntax dependency on 2.6, and will no longer work
21 on Python <= 2.5.
21 on Python <= 2.5.
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[zmq,test]
41 $ easy_install ipython[zmq,test]
42
42
43 This will get pyzmq, which is needed for
43 This will get pyzmq, which is 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. If you install IPython with :mod:`setuptools`, (e.g. with `easy_install`),
70 :mod:`readline`.
70 then the appropriate :mod:`readline` for your platform will be installed.
71 See below for details of how to make sure you have a working :mod:`readline`.
71
72
72 Installation using easy_install
73 Installation using easy_install
73 -------------------------------
74 -------------------------------
74
75
75 If you have :mod:`setuptools` installed, the easiest way of getting IPython is
76 If you have :mod:`setuptools` installed, the easiest way of getting IPython is
76 to simple use :command:`easy_install`:
77 to simple use :command:`easy_install`:
77
78
78 .. code-block:: bash
79 .. code-block:: bash
79
80
80 $ easy_install ipython
81 $ easy_install ipython
81
82
82 That's it.
83 That's it.
83
84
84 Installation from source
85 Installation from source
85 ------------------------
86 ------------------------
86
87
87 If you don't want to use :command:`easy_install`, or don't have it installed,
88 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
89 just grab the latest stable build of IPython from `here
89 <http://ipython.scipy.org/dist/>`_. Then do the following:
90 <https://github.com/ipython/ipython/downloads>`_. Then do the following:
90
91
91 .. code-block:: bash
92 .. code-block:: bash
92
93
93 $ tar -xzf ipython.tar.gz
94 $ tar -xzf ipython.tar.gz
94 $ cd ipython
95 $ cd ipython
95 $ python setup.py install
96 $ python setup.py install
96
97
97 If you are installing to a location (like ``/usr/local``) that requires higher
98 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`.
99 permissions, you may need to run the last command with :command:`sudo`.
99
100
100 Windows
101 Windows
101 -------
102 -------
102
103
103 There are a few caveats for Windows users. The main issue is that a basic
104 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
105 ``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
106 shortcuts, which most users want. To get an installation with these, you can
106 use any of the following alternatives:
107 use any of the following alternatives:
107
108
108 1. Install using :command:`easy_install`.
109 1. Install using :command:`easy_install`.
109
110
110 2. Install using our binary ``.exe`` Windows installer, which can be found at
111 2. Install using our binary ``.exe`` Windows installer, which can be found
111 `here <http://ipython.scipy.org/dist/>`_
112 `here <http://ipython.scipy.org/dist/>`_
112
113
113 3. Install from source, but using :mod:`setuptools` (``python setupegg.py
114 3. Install from source, but using :mod:`setuptools` (``python setupegg.py
114 install``).
115 install``).
115
116
116 IPython by default runs in a terminal window, but the normal terminal
117 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
118 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
119 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
120 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
121 IPython tab, which is very convenient to create new IPython sessions directly
121 from the working terminal.
122 from the working terminal.
122
123
123 .. _Console: http://sourceforge.net/projects/console
124 .. _Console: http://sourceforge.net/projects/console
124
125
125 Note for Windows 64 bit users: you may have difficulties with the stock
126 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
127 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
128 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
129 with the setuptools method indicated in #3 above. See `this bug report`_ for
129 further details.
130 further details.
130
131
131 .. _this bug report: https://bugs.launchpad.net/ipython/+bug/382214
132 .. _this bug report: https://bugs.launchpad.net/ipython/+bug/382214
132
133
133
134
134 Installing the development version
135 Installing the development version
135 ----------------------------------
136 ----------------------------------
136
137
137 It is also possible to install the development version of IPython from our
138 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
139 `Git <http://git-scm.com/>`_ source code repository. To do this you will
139 need to have Bazaar installed on your system. Then just do:
140 need to have Git installed on your system. Then just do:
140
141
141 .. code-block:: bash
142 .. code-block:: bash
142
143
143 $ bzr branch lp:ipython
144 $ git clone https://github.com/ipython/ipython.git
144 $ cd ipython
145 $ cd ipython
145 $ python setup.py install
146 $ python setup.py install
146
147
147 Again, this last step on Windows won't create ``.bat`` files or Start Menu
148 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.
149 shortcuts, so you will have to use one of the other approaches listed above.
149
150
150 Some users want to be able to follow the development branch as it changes. If
151 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
152 you have :mod:`setuptools` installed, this is easy. Simply replace the last
152 step by:
153 step by:
153
154
154 .. code-block:: bash
155 .. code-block:: bash
155
156
156 $ python setupegg.py develop
157 $ python setupegg.py develop
157
158
158 This creates links in the right places and installs the command line script to
159 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,
160 the appropriate places. Then, if you want to update your IPython at any time,
160 just do:
161 just do:
161
162
162 .. code-block:: bash
163 .. code-block:: bash
163
164
164 $ bzr pull
165 $ git pull
165
166
166 Basic optional dependencies
167 Basic optional dependencies
167 ===========================
168 ===========================
168
169
169 There are a number of basic optional dependencies that most users will want to
170 There are a number of basic optional dependencies that most users will want to
170 get. These are:
171 get. These are:
171
172
172 * readline (for command line editing, tab completion, etc.)
173 * readline (for command line editing, tab completion, etc.)
173 * nose (to run the IPython test suite)
174 * nose (to run the IPython test suite)
174 * pexpect (to use things like irunner)
175 * pexpect (to use things like irunner)
175
176
176 If you are comfortable installing these things yourself, have at it, otherwise
177 If you are comfortable installing these things yourself, have at it, otherwise
177 read on for more details.
178 read on for more details.
178
179
179 readline
180 readline
180 --------
181 --------
181
182
182 In principle, all Python distributions should come with a working
183 In principle, all Python distributions should come with a working
183 :mod:`readline` module. But, reality is not quite that simple. There are two
184 :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:
185 common situations where you won't have a working :mod:`readline` module:
185
186
186 * If you are using the built-in Python on Mac OS X.
187 * If you are using the built-in Python on Mac OS X.
187
188
188 * If you are running Windows, which doesn't have a :mod:`readline` module.
189 * If you are running Windows, which doesn't have a :mod:`readline` module.
189
190
191 When IPython is installed with :mod:`setuptools`, (e.g. with `easy_install`),
192 readline is added as a dependency on OS X, and PyReadline on Windows, and will
193 be installed on your system. However, if you do not use setuptools, you may
194 have to install one of these packages yourself.
190
195
191 On OS X, the built-in Python doesn't not have :mod:`readline` because of
196 On OS X, the built-in Python doesn't not have :mod:`readline` because of
192 license issues. Starting with OS X 10.5 (Leopard), Apple's built-in Python has
197 license issues. Starting with OS X 10.5 (Leopard), Apple's built-in Python has
193 a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9,
198 a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9,
194 many of the issues related to the differences between readline and libedit seem
199 many of the issues related to the differences between readline and libedit seem
195 to have been resolved. While you may find libedit sufficient, we have
200 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
201 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
202 main environment consider libedit unacceptable for productive, regular use with
198 IPython.
203 IPython.
199
204
200 Therefore, we *strongly* recommend that on OS X you get the full
205 Therefore, we *strongly* recommend that on OS X you get the full
201 :mod:`readline` module. We will *not* consider completion/history problems to
206 :mod:`readline` module. We will *not* consider completion/history problems to
202 be bugs for IPython if you are using libedit.
207 be bugs for IPython if you are using libedit.
203
208
204 To get a working :mod:`readline` module, just do (with :mod:`setuptools`
209 To get a working :mod:`readline` module, just do (with :mod:`setuptools`
205 installed):
210 installed):
206
211
207 .. code-block:: bash
212 .. code-block:: bash
208
213
209 $ easy_install readline
214 $ easy_install readline
210
215
211 .. note::
216 .. note::
212
217
213 Other Python distributions on OS X (such as fink, MacPorts and the official
218 Other Python distributions on OS X (such as fink, MacPorts and the official
214 python.org binaries) already have readline installed so you likely don't
219 python.org binaries) already have readline installed so you likely don't
215 have to do this step.
220 have to do this step.
216
221
217 If needed, the readline egg can be build and installed from source (see the
222 If needed, the readline egg can be build and installed from source (see the
218 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard).
223 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard).
219
224
220 On Windows, you will need the PyReadline module. PyReadline is a separate,
225 On Windows, you will need the PyReadline module. PyReadline is a separate,
221 Windows only implementation of readline that uses native Windows calls through
226 Windows only implementation of readline that uses native Windows calls through
222 :mod:`ctypes`. The easiest way of installing PyReadline is you use the binary
227 :mod:`ctypes`. The easiest way of installing PyReadline is you use the binary
223 installer available `here <http://ipython.scipy.org/dist/>`_. The :mod:`ctypes`
228 installer available `here <https://launchpad.net/pyreadline/+download>`_.
224 module, which comes with Python 2.5 and greater, is required by PyReadline.
225
229
226 nose
230 nose
227 ----
231 ----
228
232
229 To run the IPython test suite you will need the :mod:`nose` package. Nose
233 To run the IPython test suite you will need the :mod:`nose` package. Nose
230 provides a great way of sniffing out and running all of the IPython tests. The
234 provides a great way of sniffing out and running all of the IPython tests. The
231 simplest way of getting nose, is to use :command:`easy_install`:
235 simplest way of getting nose, is to use :command:`easy_install`:
232
236
233 .. code-block:: bash
237 .. code-block:: bash
234
238
235 $ easy_install nose
239 $ easy_install nose
236
240
237 Another way of getting this is to do:
241 Another way of getting this is to do:
238
242
239 .. code-block:: bash
243 .. code-block:: bash
240
244
241 $ easy_install ipython[test]
245 $ easy_install ipython[test]
242
246
243 For more installation options, see the `nose website
247 For more installation options, see the `nose website
244 <http://somethingaboutorange.com/mrl/projects/nose/>`_.
248 <http://somethingaboutorange.com/mrl/projects/nose/>`_.
245
249
246 .. warning::
250 .. warning::
247
251
248 As described above, the :command:`iptest` command currently doesn't work.
252 As described above, the :command:`iptest` command currently doesn't work.
249
253
250 Once you have nose installed, you can run IPython's test suite using the
254 Once you have nose installed, you can run IPython's test suite using the
251 iptest command:
255 iptest command:
252
256
253 .. code-block:: bash
257 .. code-block:: bash
254
258
255 $ iptest
259 $ iptest
256
260
257 pexpect
261 pexpect
258 -------
262 -------
259
263
260 The `pexpect <http://www.noah.org/wiki/Pexpect>`_ package is used in IPython's
264 The pexpect package is used in IPython's :command:`irunner` script, as well as
261 :command:`irunner` script. On Unix platforms (including OS X), just do:
265 for managing subprocesses [pexpect]_. IPython now includes a version of pexpect
266 in :mod:`IPython.external`, but if you have installed pexpect, IPython will use
267 that instead. On Unix platforms (including OS X), just do:
262
268
263 .. code-block:: bash
269 .. code-block:: bash
264
270
265 $ easy_install pexpect
271 $ easy_install pexpect
266
272
267 Windows users are out of luck as pexpect does not run there.
273 Windows users are out of luck as pexpect does not run there.
268
274
269 Dependencies for IPython.parallel (parallel computing)
275 Dependencies for IPython.parallel (parallel computing)
270 ======================================================
276 ======================================================
271
277
272 :mod:`IPython.kernel` has been replaced by :mod:`IPython.parallel`,
278 :mod:`IPython.kernel` has been replaced by :mod:`IPython.parallel`,
273 which uses ZeroMQ for all communication.
279 which uses ZeroMQ for all communication.
274
280
275 IPython.parallel provides a nice architecture for parallel computing. The
281 IPython.parallel provides a nice architecture for parallel computing. The
276 main focus of this architecture is on interactive parallel computing. These
282 main focus of this architecture is on interactive parallel computing. These
277 features require just one package: pyzmq. See the next section for pyzmq
283 features require just one package: pyzmq. See the next section for pyzmq
278 details.
284 details.
279
285
280 On a Unix style platform (including OS X), if you want to use
286 On a Unix style platform (including OS X), if you want to use
281 :mod:`setuptools`, you can just do:
287 :mod:`setuptools`, you can just do:
282
288
283 .. code-block:: bash
289 .. code-block:: bash
284
290
285 $ easy_install ipython[zmq] # will include pyzmq
291 $ easy_install ipython[zmq] # will include pyzmq
286
292
287 Security in IPython.parallel is provided by SSH tunnels. By default, Linux
293 Security in IPython.parallel is provided by SSH tunnels. By default, Linux
288 and OSX clients will use the shell ssh command, but on Windows, we also
294 and OSX clients will use the shell ssh command, but on Windows, we also
289 support tunneling with paramiko [paramiko]_.
295 support tunneling with paramiko [paramiko]_.
290
296
291 Dependencies for IPython.zmq
297 Dependencies for IPython.zmq
292 ============================
298 ============================
293
299
294 pyzmq
300 pyzmq
295 -----
301 -----
296
302
297 IPython 0.11 introduced some new functionality, including a two-process
303 IPython 0.11 introduced some new functionality, including a two-process
298 execution model using ZeroMQ for communication [ZeroMQ]_. The Python bindings
304 execution model using ZeroMQ for communication [ZeroMQ]_. The Python bindings
299 to ZeroMQ are found in the pyzmq project, which is easy_install-able once you
305 to ZeroMQ are found in the pyzmq project, which is easy_install-able once you
300 have ZeroMQ installed (or even if you don't).
306 have ZeroMQ installed (or even if you don't).
301
307
302 IPython.zmq depends on pyzmq >= 2.0.10.1, but IPython.parallel requires the more
308 IPython.zmq depends on pyzmq >= 2.0.10.1, but IPython.parallel requires the more
303 recent 2.1.4. 2.1.4 also has binary releases for OSX and Windows, that do not
309 recent 2.1.4. 2.1.4 also has binary releases for OSX and Windows, that do not
304 require prior installation of libzmq.
310 require prior installation of libzmq.
305
311
306 Dependencies for ipython-qtconsole (new GUI)
312 Dependencies for ipython-qtconsole (new GUI)
307 ============================================
313 ============================================
308
314
309 PyQt
315 PyQt
310 ----
316 ----
311
317
312 Also with 0.11, a new GUI was added using the work in :mod:`IPython.zmq`,
318 Also with 0.11, a new GUI was added using the work in :mod:`IPython.zmq`,
313 which can be launched with ``ipython-qtconsole``. The GUI is built on PyQt ,
319 which can be launched with ``ipython-qtconsole``. The GUI is built on PyQt ,
314 which can be installed from the
320 which can be installed from the
315 `PyQt website <http://www.riverbankcomputing.co.uk/>`_.
321 `PyQt website <http://www.riverbankcomputing.co.uk/>`_.
316
322
317 pygments
323 pygments
318 --------
324 --------
319
325
320 The syntax-highlighting in ``ipython-qtconsole`` is done with the pygments project,
326 The syntax-highlighting in ``ipython-qtconsole`` is done with the pygments project,
321 which is easy_install-able.
327 which is easy_install-able [pygments]_.
322
328
323 .. [Twisted] Twisted matrix. http://twistedmatrix.org
324 .. [ZopeInterface] http://pypi.python.org/pypi/zope.interface
325 .. [Foolscap] Foolscap network protocol. http://foolscap.lothar.com/trac
326 .. [pyOpenSSL] pyOpenSSL. http://pyopenssl.sourceforge.net
327 .. [ZeroMQ] ZeroMQ. http://www.zeromq.org
329 .. [ZeroMQ] ZeroMQ. http://www.zeromq.org
328 .. [paramiko] paramiko. https://github.com/robey/paramiko
330 .. [paramiko] paramiko. https://github.com/robey/paramiko
331 .. [pygments] Pygments syntax highlighting. http://pygments.org
332 .. [pexpect] Pexpect. http://www.noah.org/wiki/Pexpect
General Comments 0
You need to be logged in to leave comments. Login now