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