##// END OF EJS Templates
Small documentation updates and comments about Windows install.
Fernando Perez -
Show More
@@ -1,244 +1,249
1 .. _initial config:
1 .. _initial config:
2
2
3 =========================================
3 =========================================
4 Initial configuration of your environment
4 Initial configuration of your environment
5 =========================================
5 =========================================
6
6
7 This section will help you set various things in your environment for
7 This section will help you set various things in your environment for
8 your IPython sessions to be as efficient as possible. All of IPython's
8 your IPython sessions to be as efficient as possible. All of IPython's
9 configuration information, along with several example files, is stored
9 configuration information, along with several example files, is stored
10 in a directory named by default $HOME/.ipython. You can change this by
10 in a directory named by default $HOME/.ipython. You can change this by
11 defining the environment variable IPYTHONDIR, or at runtime with the
11 defining the environment variable IPYTHONDIR, or at runtime with the
12 command line option -ipythondir.
12 command line option -ipythondir.
13
13
14 If all goes well, the first time you run IPython it should automatically create
14 If all goes well, the first time you run IPython it should automatically create
15 a user copy of the config directory for you, based on its builtin defaults. You
15 a user copy of the config directory for you, based on its builtin defaults. You
16 can look at the files it creates to learn more about configuring the
16 can look at the files it creates to learn more about configuring the
17 system. The main file you will modify to configure IPython's behavior is called
17 system. The main file you will modify to configure IPython's behavior is called
18 ipythonrc (with a .ini extension under Windows), included for reference
18 ipythonrc (with a .ini extension under Windows), included for reference
19 :ref:`here <ipythonrc>`. This file is very commented and has many variables you
19 :ref:`here <ipythonrc>`. This file is very commented and has many variables you
20 can change to suit your taste, you can find more details :ref:`here
20 can change to suit your taste, you can find more details :ref:`here
21 <customization>`. Here we discuss the basic things you will want to make sure
21 <customization>`. Here we discuss the basic things you will want to make sure
22 things are working properly from the beginning.
22 things are working properly from the beginning.
23
23
24
24
25 .. _accessing_help:
25 .. _accessing_help:
26
26
27 Access to the Python help system
27 Access to the Python help system
28 ================================
28 ================================
29
29
30 This is true for Python in general (not just for IPython): you should have an
30 This is true for Python in general (not just for IPython): you should have an
31 environment variable called PYTHONDOCS pointing to the directory where your
31 environment variable called PYTHONDOCS pointing to the directory where your
32 HTML Python documentation lives. In my system it's
32 HTML Python documentation lives. In my system it's
33 :file:`/usr/share/doc/python-doc/html`, check your local details or ask your
33 :file:`/usr/share/doc/python-doc/html`, check your local details or ask your
34 systems administrator.
34 systems administrator.
35
35
36 This is the directory which holds the HTML version of the Python
36 This is the directory which holds the HTML version of the Python
37 manuals. Unfortunately it seems that different Linux distributions
37 manuals. Unfortunately it seems that different Linux distributions
38 package these files differently, so you may have to look around a bit.
38 package these files differently, so you may have to look around a bit.
39 Below I show the contents of this directory on my system for reference::
39 Below I show the contents of this directory on my system for reference::
40
40
41 [html]> ls
41 [html]> ls
42 about.html dist/ icons/ lib/ python2.5.devhelp.gz whatsnew/
42 about.html dist/ icons/ lib/ python2.5.devhelp.gz whatsnew/
43 acks.html doc/ index.html mac/ ref/
43 acks.html doc/ index.html mac/ ref/
44 api/ ext/ inst/ modindex.html tut/
44 api/ ext/ inst/ modindex.html tut/
45
45
46 You should really make sure this variable is correctly set so that
46 You should really make sure this variable is correctly set so that
47 Python's pydoc-based help system works. It is a powerful and convenient
47 Python's pydoc-based help system works. It is a powerful and convenient
48 system with full access to the Python manuals and all modules accessible
48 system with full access to the Python manuals and all modules accessible
49 to you.
49 to you.
50
50
51 Under Windows it seems that pydoc finds the documentation automatically,
51 Under Windows it seems that pydoc finds the documentation automatically,
52 so no extra setup appears necessary.
52 so no extra setup appears necessary.
53
53
54
54
55 Editor
55 Editor
56 ======
56 ======
57
57
58 The %edit command (and its alias %ed) will invoke the editor set in your
58 The %edit command (and its alias %ed) will invoke the editor set in your
59 environment as EDITOR. If this variable is not set, it will default to
59 environment as EDITOR. If this variable is not set, it will default to
60 vi under Linux/Unix and to notepad under Windows. You may want to set
60 vi under Linux/Unix and to notepad under Windows. You may want to set
61 this variable properly and to a lightweight editor which doesn't take
61 this variable properly and to a lightweight editor which doesn't take
62 too long to start (that is, something other than a new instance of
62 too long to start (that is, something other than a new instance of
63 Emacs). This way you can edit multi-line code quickly and with the power
63 Emacs). This way you can edit multi-line code quickly and with the power
64 of a real editor right inside IPython.
64 of a real editor right inside IPython.
65
65
66 If you are a dedicated Emacs user, you should set up the Emacs server so
66 If you are a dedicated Emacs user, you should set up the Emacs server so
67 that new requests are handled by the original process. This means that
67 that new requests are handled by the original process. This means that
68 almost no time is spent in handling the request (assuming an Emacs
68 almost no time is spent in handling the request (assuming an Emacs
69 process is already running). For this to work, you need to set your
69 process is already running). For this to work, you need to set your
70 EDITOR environment variable to 'emacsclient'. The code below, supplied
70 EDITOR environment variable to 'emacsclient'. The code below, supplied
71 by Francois Pinard, can then be used in your .emacs file to enable the
71 by Francois Pinard, can then be used in your .emacs file to enable the
72 server::
72 server::
73
73
74 (defvar server-buffer-clients)
74 (defvar server-buffer-clients)
75 (when (and (fboundp 'server-start) (string-equal (getenv "TERM") 'xterm))
75 (when (and (fboundp 'server-start) (string-equal (getenv "TERM") 'xterm))
76 (server-start)
76 (server-start)
77 (defun fp-kill-server-with-buffer-routine ()
77 (defun fp-kill-server-with-buffer-routine ()
78 (and server-buffer-clients (server-done)))
78 (and server-buffer-clients (server-done)))
79 (add-hook 'kill-buffer-hook 'fp-kill-server-with-buffer-routine))
79 (add-hook 'kill-buffer-hook 'fp-kill-server-with-buffer-routine))
80
80
81 You can also set the value of this editor via the commmand-line option
81 You can also set the value of this editor via the commmand-line option
82 '-editor' or in your ipythonrc file. This is useful if you wish to use
82 '-editor' or in your ipythonrc file. This is useful if you wish to use
83 specifically for IPython an editor different from your typical default
83 specifically for IPython an editor different from your typical default
84 (and for Windows users who tend to use fewer environment variables).
84 (and for Windows users who tend to use fewer environment variables).
85
85
86
86
87 Color
87 Color
88 =====
88 =====
89
89
90 The default IPython configuration has most bells and whistles turned on
90 The default IPython configuration has most bells and whistles turned on
91 (they're pretty safe). But there's one that may cause problems on some
91 (they're pretty safe). But there's one that may cause problems on some
92 systems: the use of color on screen for displaying information. This is
92 systems: the use of color on screen for displaying information. This is
93 very useful, since IPython can show prompts and exception tracebacks
93 very useful, since IPython can show prompts and exception tracebacks
94 with various colors, display syntax-highlighted source code, and in
94 with various colors, display syntax-highlighted source code, and in
95 general make it easier to visually parse information.
95 general make it easier to visually parse information.
96
96
97 The following terminals seem to handle the color sequences fine:
97 The following terminals seem to handle the color sequences fine:
98
98
99 * Linux main text console, KDE Konsole, Gnome Terminal, E-term,
99 * Linux main text console, KDE Konsole, Gnome Terminal, E-term,
100 rxvt, xterm.
100 rxvt, xterm.
101 * CDE terminal (tested under Solaris). This one boldfaces light colors.
101 * CDE terminal (tested under Solaris). This one boldfaces light colors.
102 * (X)Emacs buffers. See the emacs_ section for more details on
102 * (X)Emacs buffers. See the emacs_ section for more details on
103 using IPython with (X)Emacs.
103 using IPython with (X)Emacs.
104 * A Windows (XP/2k) command prompt with pyreadline_.
104 * A Windows (XP/2k) command prompt with pyreadline_.
105 * A Windows (XP/2k) CygWin shell. Although some users have reported
105 * A Windows (XP/2k) CygWin shell. Although some users have reported
106 problems; it is not clear whether there is an issue for everyone
106 problems; it is not clear whether there is an issue for everyone
107 or only under specific configurations. If you have full color
107 or only under specific configurations. If you have full color
108 support under cygwin, please post to the IPython mailing list so
108 support under cygwin, please post to the IPython mailing list so
109 this issue can be resolved for all users.
109 this issue can be resolved for all users.
110
110
111 .. _pyreadline: https://code.launchpad.net/pyreadline
111 .. _pyreadline: https://code.launchpad.net/pyreadline
112
112
113 These have shown problems:
113 These have shown problems:
114
114
115 * Windows command prompt in WinXP/2k logged into a Linux machine via
115 * Windows command prompt in WinXP/2k logged into a Linux machine via
116 telnet or ssh.
116 telnet or ssh.
117 * Windows native command prompt in WinXP/2k, without Gary Bishop's
117 * Windows native command prompt in WinXP/2k, without Gary Bishop's
118 extensions. Once Gary's readline library is installed, the normal
118 extensions. Once Gary's readline library is installed, the normal
119 WinXP/2k command prompt works perfectly.
119 WinXP/2k command prompt works perfectly.
120
120
121 Currently the following color schemes are available:
121 Currently the following color schemes are available:
122
122
123 * NoColor: uses no color escapes at all (all escapes are empty '' ''
123 * NoColor: uses no color escapes at all (all escapes are empty '' ''
124 strings). This 'scheme' is thus fully safe to use in any terminal.
124 strings). This 'scheme' is thus fully safe to use in any terminal.
125 * Linux: works well in Linux console type environments: dark
125 * Linux: works well in Linux console type environments: dark
126 background with light fonts. It uses bright colors for
126 background with light fonts. It uses bright colors for
127 information, so it is difficult to read if you have a light
127 information, so it is difficult to read if you have a light
128 colored background.
128 colored background.
129 * LightBG: the basic colors are similar to those in the Linux scheme
129 * LightBG: the basic colors are similar to those in the Linux scheme
130 but darker. It is easy to read in terminals with light backgrounds.
130 but darker. It is easy to read in terminals with light backgrounds.
131
131
132 IPython uses colors for two main groups of things: prompts and
132 IPython uses colors for two main groups of things: prompts and
133 tracebacks which are directly printed to the terminal, and the object
133 tracebacks which are directly printed to the terminal, and the object
134 introspection system which passes large sets of data through a pager.
134 introspection system which passes large sets of data through a pager.
135
135
136
136
137 Input/Output prompts and exception tracebacks
137 Input/Output prompts and exception tracebacks
138 =============================================
138 =============================================
139
139
140 You can test whether the colored prompts and tracebacks work on your
140 You can test whether the colored prompts and tracebacks work on your
141 system interactively by typing '%colors Linux' at the prompt (use
141 system interactively by typing '%colors Linux' at the prompt (use
142 '%colors LightBG' if your terminal has a light background). If the input
142 '%colors LightBG' if your terminal has a light background). If the input
143 prompt shows garbage like::
143 prompt shows garbage like::
144
144
145 [0;32mIn [[1;32m1[0;32m]: [0;00m
145 [0;32mIn [[1;32m1[0;32m]: [0;00m
146
146
147 instead of (in color) something like::
147 instead of (in color) something like::
148
148
149 In [1]:
149 In [1]:
150
150
151 this means that your terminal doesn't properly handle color escape
151 this means that your terminal doesn't properly handle color escape
152 sequences. You can go to a 'no color' mode by typing '%colors NoColor'.
152 sequences. You can go to a 'no color' mode by typing '%colors NoColor'.
153
153
154 You can try using a different terminal emulator program (Emacs users,
154 You can try using a different terminal emulator program (Emacs users,
155 see below). To permanently set your color preferences, edit the file
155 see below). To permanently set your color preferences, edit the file
156 $HOME/.ipython/ipythonrc and set the colors option to the desired value.
156 $HOME/.ipython/ipythonrc and set the colors option to the desired value.
157
157
158
158
159 Object details (types, docstrings, source code, etc.)
159 Object details (types, docstrings, source code, etc.)
160 =====================================================
160 =====================================================
161
161
162 IPython has a set of special functions for studying the objects you are working
162 IPython has a set of special functions for studying the objects you are working
163 with, discussed in detail :ref:`here <dynamic_object_info>`. But this system
163 with, discussed in detail :ref:`here <dynamic_object_info>`. But this system
164 relies on passing information which is longer than your screen through a data
164 relies on passing information which is longer than your screen through a data
165 pager, such as the common Unix less and more programs. In order to be able to
165 pager, such as the common Unix less and more programs. In order to be able to
166 see this information in color, your pager needs to be properly configured. I
166 see this information in color, your pager needs to be properly configured. I
167 strongly recommend using less instead of more, as it seems that more simply can
167 strongly recommend using less instead of more, as it seems that more simply can
168 not understand colored text correctly.
168 not understand colored text correctly.
169
169
170 In order to configure less as your default pager, do the following:
170 In order to configure less as your default pager, do the following:
171
171
172 1. Set the environment PAGER variable to less.
172 1. Set the environment PAGER variable to less.
173 2. Set the environment LESS variable to -r (plus any other options
173 2. Set the environment LESS variable to -r (plus any other options
174 you always want to pass to less by default). This tells less to
174 you always want to pass to less by default). This tells less to
175 properly interpret control sequences, which is how color
175 properly interpret control sequences, which is how color
176 information is given to your terminal.
176 information is given to your terminal.
177
177
178 For the bash shell, add to your ~/.bashrc file the lines::
179
180 export PAGER=less
181 export LESS=-r
182
178 For the csh or tcsh shells, add to your ~/.cshrc file the lines::
183 For the csh or tcsh shells, add to your ~/.cshrc file the lines::
179
184
180 setenv PAGER less
185 setenv PAGER less
181 setenv LESS -r
186 setenv LESS -r
182
187
183 There is similar syntax for other Unix shells, look at your system
188 There is similar syntax for other Unix shells, look at your system
184 documentation for details.
189 documentation for details.
185
190
186 If you are on a system which lacks proper data pagers (such as Windows),
191 If you are on a system which lacks proper data pagers (such as Windows),
187 IPython will use a very limited builtin pager.
192 IPython will use a very limited builtin pager.
188
193
189 .. _emacs:
194 .. _emacs:
190
195
191 (X)Emacs configuration
196 (X)Emacs configuration
192 ======================
197 ======================
193
198
194 Thanks to the work of Alexander Schmolck and Prabhu Ramachandran,
199 Thanks to the work of Alexander Schmolck and Prabhu Ramachandran,
195 currently (X)Emacs and IPython get along very well.
200 currently (X)Emacs and IPython get along very well.
196
201
197 Important note: You will need to use a recent enough version of
202 Important note: You will need to use a recent enough version of
198 python-mode.el, along with the file ipython.el. You can check that the
203 python-mode.el, along with the file ipython.el. You can check that the
199 version you have of python-mode.el is new enough by either looking at
204 version you have of python-mode.el is new enough by either looking at
200 the revision number in the file itself, or asking for it in (X)Emacs via
205 the revision number in the file itself, or asking for it in (X)Emacs via
201 M-x py-version. Versions 4.68 and newer contain the necessary fixes for
206 M-x py-version. Versions 4.68 and newer contain the necessary fixes for
202 proper IPython support.
207 proper IPython support.
203
208
204 The file ipython.el is included with the IPython distribution, in the
209 The file ipython.el is included with the IPython distribution, in the
205 documentation directory (where this manual resides in PDF and HTML
210 documentation directory (where this manual resides in PDF and HTML
206 formats).
211 formats).
207
212
208 Once you put these files in your Emacs path, all you need in your .emacs
213 Once you put these files in your Emacs path, all you need in your .emacs
209 file is::
214 file is::
210
215
211 (require 'ipython)
216 (require 'ipython)
212
217
213 This should give you full support for executing code snippets via
218 This should give you full support for executing code snippets via
214 IPython, opening IPython as your Python shell via ``C-c !``, etc.
219 IPython, opening IPython as your Python shell via ``C-c !``, etc.
215
220
216 You can customize the arguments passed to the IPython instance at startup by
221 You can customize the arguments passed to the IPython instance at startup by
217 setting the ``py-python-command-args`` variable. For example, to start always
222 setting the ``py-python-command-args`` variable. For example, to start always
218 in ``pylab`` mode with hardcoded light-background colors, you can use::
223 in ``pylab`` mode with hardcoded light-background colors, you can use::
219
224
220 (setq py-python-command-args '("-pylab" "-colors" "LightBG"))
225 (setq py-python-command-args '("-pylab" "-colors" "LightBG"))
221
226
222 If you happen to get garbage instead of colored prompts as described in
227 If you happen to get garbage instead of colored prompts as described in
223 the previous section, you may need to set also in your .emacs file::
228 the previous section, you may need to set also in your .emacs file::
224
229
225 (setq ansi-color-for-comint-mode t)
230 (setq ansi-color-for-comint-mode t)
226
231
227 Notes:
232 Notes:
228
233
229 * There is one caveat you should be aware of: you must start the
234 * There is one caveat you should be aware of: you must start the
230 IPython shell before attempting to execute any code regions via
235 IPython shell before attempting to execute any code regions via
231 ``C-c |``. Simply type C-c ! to start IPython before passing any code
236 ``C-c |``. Simply type C-c ! to start IPython before passing any code
232 regions to the interpreter, and you shouldn't experience any
237 regions to the interpreter, and you shouldn't experience any
233 problems.
238 problems.
234 This is due to a bug in Python itself, which has been fixed for
239 This is due to a bug in Python itself, which has been fixed for
235 Python 2.3, but exists as of Python 2.2.2 (reported as SF bug [
240 Python 2.3, but exists as of Python 2.2.2 (reported as SF bug [
236 737947 ]).
241 737947 ]).
237 * The (X)Emacs support is maintained by Alexander Schmolck, so all
242 * The (X)Emacs support is maintained by Alexander Schmolck, so all
238 comments/requests should be directed to him through the IPython
243 comments/requests should be directed to him through the IPython
239 mailing lists.
244 mailing lists.
240 * This code is still somewhat experimental so it's a bit rough
245 * This code is still somewhat experimental so it's a bit rough
241 around the edges (although in practice, it works quite well).
246 around the edges (although in practice, it works quite well).
242 * Be aware that if you customize py-python-command previously, this
247 * Be aware that if you customize py-python-command previously, this
243 value will override what ipython.el does (because loading the
248 value will override what ipython.el does (because loading the
244 customization variables comes later).
249 customization variables comes later).
@@ -1,281 +1,293
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. IPython requires Python version 2.4 or greater. Light testing
12 dependencies. Officially, IPython requires Python version 2.5 or 2.6. We
13 has been done on version 2.6, and so far everything looks fine. We have *not*
13 have *not* yet started to port IPython to Python 3.0.
14 yet started to port IPython to Python 3.0, where the language changes are much
15 more significant.
16
14
17 .. warning::
15 .. warning::
18
16
19 IPython will not work with Python 2.4 or below.
17 Officially, IPython supports Python versions 2.5 and 2.6.
18
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
21 anymore. If you need to use 2.4, you can still run IPython 0.9.
20
22
21 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
22 :command:`easy_install` command line program. In many scenarios, this provides
24 :command:`easy_install` command line program. In many scenarios, this provides
23 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
24 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
25 website.
27 website.
26
28
27 More general information about installing Python packages can be found in
29 More general information about installing Python packages can be found in
28 Python's documentation at http://www.python.org/doc/.
30 Python's documentation at http://www.python.org/doc/.
29
31
30 Quickstart
32 Quickstart
31 ==========
33 ==========
32
34
33 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
34 Windows), the following will download and install IPython *and* the main
36 Windows), the following will download and install IPython *and* the main
35 optional dependencies::
37 optional dependencies::
36
38
37 $ easy_install ipython[kernel,security,test]
39 $ easy_install ipython[kernel,security,test]
38
40
39 This will get Twisted, zope.interface and Foolscap, which are needed for
41 This will get Twisted, zope.interface and Foolscap, which are needed for
40 IPython's parallel computing features as well as the nose package, which will
42 IPython's parallel computing features as well as the nose package, which will
41 enable you to run IPython's test suite. To run IPython's test suite, use the
43 enable you to run IPython's test suite. To run IPython's test suite, use the
42 :command:`iptest` command::
44 :command:`iptest` command::
43
45
44 $ iptest
46 $ iptest
45
47
46 Read on for more specific details and instructions for Windows.
48 Read on for more specific details and instructions for Windows.
47
49
48 Installing IPython itself
50 Installing IPython itself
49 =========================
51 =========================
50
52
51 Given a properly built Python, the basic interactive IPython shell will work
53 Given a properly built Python, the basic interactive IPython shell will work
52 with no external dependencies. However, some Python distributions
54 with no external dependencies. However, some Python distributions
53 (particularly on Windows and OS X), don't come with a working :mod:`readline`
55 (particularly on Windows and OS X), don't come with a working :mod:`readline`
54 module. The IPython shell will work without :mod:`readline`, but will lack
56 module. The IPython shell will work without :mod:`readline`, but will lack
55 many features that users depend on, such as tab completion and command line
57 many features that users depend on, such as tab completion and command line
56 editing. See below for details of how to make sure you have a working
58 editing. See below for details of how to make sure you have a working
57 :mod:`readline`.
59 :mod:`readline`.
58
60
59 Installation using easy_install
61 Installation using easy_install
60 -------------------------------
62 -------------------------------
61
63
62 If you have :mod:`setuptools` installed, the easiest way of getting IPython is
64 If you have :mod:`setuptools` installed, the easiest way of getting IPython is
63 to simple use :command:`easy_install`::
65 to simple use :command:`easy_install`::
64
66
65 $ easy_install ipython
67 $ easy_install ipython
66
68
67 That's it.
69 That's it.
68
70
69 Installation from source
71 Installation from source
70 ------------------------
72 ------------------------
71
73
72 If you don't want to use :command:`easy_install`, or don't have it installed,
74 If you don't want to use :command:`easy_install`, or don't have it installed,
73 just grab the latest stable build of IPython from `here
75 just grab the latest stable build of IPython from `here
74 <http://ipython.scipy.org/dist/>`_. Then do the following::
76 <http://ipython.scipy.org/dist/>`_. Then do the following::
75
77
76 $ tar -xzf ipython.tar.gz
78 $ tar -xzf ipython.tar.gz
77 $ cd ipython
79 $ cd ipython
78 $ python setup.py install
80 $ python setup.py install
79
81
80 If you are installing to a location (like ``/usr/local``) that requires higher
82 If you are installing to a location (like ``/usr/local``) that requires higher
81 permissions, you may need to run the last command with :command:`sudo`.
83 permissions, you may need to run the last command with :command:`sudo`.
82
84
83 Windows
85 Windows
84 -------
86 -------
85
87
86 There are a few caveats for Windows users. The main issue is that a basic
88 There are a few caveats for Windows users. The main issue is that a basic
87 ``python setup.py install`` approach won't create ``.bat`` file or Start Menu
89 ``python setup.py install`` approach won't create ``.bat`` file or Start Menu
88 shortcuts, which most users want. To get an installation with these, there are
90 shortcuts, which most users want. To get an installation with these, you can
89 two choices:
91 use any of the following alternatives:
90
92
91 1. Install using :command:`easy_install`.
93 1. Install using :command:`easy_install`.
92
94
93 2. Install using our binary ``.exe`` Windows installer, which can be found at
95 2. Install using our binary ``.exe`` Windows installer, which can be found at
94 `here <http://ipython.scipy.org/dist/>`_
96 `here <http://ipython.scipy.org/dist/>`_
95
97
96 3. Install from source, but using :mod:`setuptools` (``python setupegg.py
98 3. Install from source, but using :mod:`setuptools` (``python setupegg.py
97 install``).
99 install``).
98
100
101 IPython by default runs in a termninal window, but the normal terminal
102 application supplied by Microsoft Windows is very primitive. You may want to
103 download the excellent and free Console_ application instead, which is a far
104 superior tool. You can even configure Console to give you by default an
105 IPython tab, which is very convenient to create new IPython sessions directly
106 from the working terminal.
107
108 .. _Console: http://sourceforge.net/projects/console
109
110
99 Installing the development version
111 Installing the development version
100 ----------------------------------
112 ----------------------------------
101
113
102 It is also possible to install the development version of IPython from our
114 It is also possible to install the development version of IPython from our
103 `Bazaar <http://bazaar-vcs.org/>`_ source code repository. To do this you will
115 `Bazaar <http://bazaar-vcs.org/>`_ source code repository. To do this you will
104 need to have Bazaar installed on your system. Then just do::
116 need to have Bazaar installed on your system. Then just do::
105
117
106 $ bzr branch lp:ipython
118 $ bzr branch lp:ipython
107 $ cd ipython
119 $ cd ipython
108 $ python setup.py install
120 $ python setup.py install
109
121
110 Again, this last step on Windows won't create ``.bat`` files or Start Menu
122 Again, this last step on Windows won't create ``.bat`` files or Start Menu
111 shortcuts, so you will have to use one of the other approaches listed above.
123 shortcuts, so you will have to use one of the other approaches listed above.
112
124
113 Some users want to be able to follow the development branch as it changes. If
125 Some users want to be able to follow the development branch as it changes. If
114 you have :mod:`setuptools` installed, this is easy. Simply replace the last
126 you have :mod:`setuptools` installed, this is easy. Simply replace the last
115 step by::
127 step by::
116
128
117 $ python setupegg.py develop
129 $ python setupegg.py develop
118
130
119 This creates links in the right places and installs the command line script to
131 This creates links in the right places and installs the command line script to
120 the appropriate places. Then, if you want to update your IPython at any time,
132 the appropriate places. Then, if you want to update your IPython at any time,
121 just do::
133 just do::
122
134
123 $ bzr pull
135 $ bzr pull
124
136
125 Basic optional dependencies
137 Basic optional dependencies
126 ===========================
138 ===========================
127
139
128 There are a number of basic optional dependencies that most users will want to
140 There are a number of basic optional dependencies that most users will want to
129 get. These are:
141 get. These are:
130
142
131 * readline (for command line editing, tab completion, etc.)
143 * readline (for command line editing, tab completion, etc.)
132 * nose (to run the IPython test suite)
144 * nose (to run the IPython test suite)
133 * pexpect (to use things like irunner)
145 * pexpect (to use things like irunner)
134
146
135 If you are comfortable installing these things yourself, have at it, otherwise
147 If you are comfortable installing these things yourself, have at it, otherwise
136 read on for more details.
148 read on for more details.
137
149
138 readline
150 readline
139 --------
151 --------
140
152
141 In principle, all Python distributions should come with a working
153 In principle, all Python distributions should come with a working
142 :mod:`readline` module. But, reality is not quite that simple. There are two
154 :mod:`readline` module. But, reality is not quite that simple. There are two
143 common situations where you won't have a working :mod:`readline` module:
155 common situations where you won't have a working :mod:`readline` module:
144
156
145 * If you are using the built-in Python on Mac OS X.
157 * If you are using the built-in Python on Mac OS X.
146
158
147 * If you are running Windows, which doesn't have a :mod:`readline` module.
159 * If you are running Windows, which doesn't have a :mod:`readline` module.
148
160
149 On OS X, the built-in Python doesn't not have :mod:`readline` because of
161 On OS X, the built-in Python doesn't not have :mod:`readline` because of
150 license issues. Starting with OS X 10.5 (Leopard), Apple's built-in Python has
162 license issues. Starting with OS X 10.5 (Leopard), Apple's built-in Python has
151 a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9,
163 a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9,
152 many of the issues related to the differences between readline and libedit have
164 many of the issues related to the differences between readline and libedit have
153 been resolved. For many users, libedit may be sufficient.
165 been resolved. For many users, libedit may be sufficient.
154
166
155 Most users on OS X will want to get the full :mod:`readline` module. To get a
167 Most users on OS X will want to get the full :mod:`readline` module. To get a
156 working :mod:`readline` module, just do (with :mod:`setuptools` installed)::
168 working :mod:`readline` module, just do (with :mod:`setuptools` installed)::
157
169
158 $ easy_install readline
170 $ easy_install readline
159
171
160 .. note:
172 .. note:
161
173
162 Other Python distributions on OS X (such as fink, MacPorts and the
174 Other Python distributions on OS X (such as fink, MacPorts and the
163 official python.org binaries) already have readline installed so
175 official python.org binaries) already have readline installed so
164 you don't have to do this step.
176 you don't have to do this step.
165
177
166 If needed, the readline egg can be build and installed from source (see the
178 If needed, the readline egg can be build and installed from source (see the
167 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard).
179 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard).
168
180
169 On Windows, you will need the PyReadline module. PyReadline is a separate,
181 On Windows, you will need the PyReadline module. PyReadline is a separate,
170 Windows only implementation of readline that uses native Windows calls through
182 Windows only implementation of readline that uses native Windows calls through
171 :mod:`ctypes`. The easiest way of installing PyReadline is you use the binary
183 :mod:`ctypes`. The easiest way of installing PyReadline is you use the binary
172 installer available `here <http://ipython.scipy.org/dist/>`_. The :mod:`ctypes`
184 installer available `here <http://ipython.scipy.org/dist/>`_. The :mod:`ctypes`
173 module, which comes with Python 2.5 and greater, is required by PyReadline. It
185 module, which comes with Python 2.5 and greater, is required by PyReadline. It
174 is available for Python 2.4 at http://python.net/crew/theller/ctypes.
186 is available for Python 2.4 at http://python.net/crew/theller/ctypes.
175
187
176 nose
188 nose
177 ----
189 ----
178
190
179 To run the IPython test suite you will need the :mod:`nose` package. Nose
191 To run the IPython test suite you will need the :mod:`nose` package. Nose
180 provides a great way of sniffing out and running all of the IPython tests. The
192 provides a great way of sniffing out and running all of the IPython tests. The
181 simplest way of getting nose, is to use :command:`easy_install`::
193 simplest way of getting nose, is to use :command:`easy_install`::
182
194
183 $ easy_install nose
195 $ easy_install nose
184
196
185 Another way of getting this is to do::
197 Another way of getting this is to do::
186
198
187 $ easy_install ipython[test]
199 $ easy_install ipython[test]
188
200
189 For more installation options, see the `nose website
201 For more installation options, see the `nose website
190 <http://somethingaboutorange.com/mrl/projects/nose/>`_. Once you have nose
202 <http://somethingaboutorange.com/mrl/projects/nose/>`_. Once you have nose
191 installed, you can run IPython's test suite using the iptest command::
203 installed, you can run IPython's test suite using the iptest command::
192
204
193 $ iptest
205 $ iptest
194
206
195
207
196 pexpect
208 pexpect
197 -------
209 -------
198
210
199 The `pexpect <http://www.noah.org/wiki/Pexpect>`_ package is used in IPython's
211 The `pexpect <http://www.noah.org/wiki/Pexpect>`_ package is used in IPython's
200 :command:`irunner` script. On Unix platforms (including OS X), just do::
212 :command:`irunner` script. On Unix platforms (including OS X), just do::
201
213
202 $ easy_install pexpect
214 $ easy_install pexpect
203
215
204 Windows users are out of luck as pexpect does not run there.
216 Windows users are out of luck as pexpect does not run there.
205
217
206 Dependencies for IPython.kernel (parallel computing)
218 Dependencies for IPython.kernel (parallel computing)
207 ====================================================
219 ====================================================
208
220
209 The IPython kernel provides a nice architecture for parallel computing. The
221 The IPython kernel provides a nice architecture for parallel computing. The
210 main focus of this architecture is on interactive parallel computing. These
222 main focus of this architecture is on interactive parallel computing. These
211 features require a number of additional packages:
223 features require a number of additional packages:
212
224
213 * zope.interface (yep, we use interfaces)
225 * zope.interface (yep, we use interfaces)
214 * Twisted (asynchronous networking framework)
226 * Twisted (asynchronous networking framework)
215 * Foolscap (a nice, secure network protocol)
227 * Foolscap (a nice, secure network protocol)
216 * pyOpenSSL (security for network connections)
228 * pyOpenSSL (security for network connections)
217
229
218 On a Unix style platform (including OS X), if you want to use :mod:`setuptools`, you can just do::
230 On a Unix style platform (including OS X), if you want to use :mod:`setuptools`, you can just do::
219
231
220 $ easy_install ipython[kernel] # the first three
232 $ easy_install ipython[kernel] # the first three
221 $ easy_install ipython[security] # pyOpenSSL
233 $ easy_install ipython[security] # pyOpenSSL
222
234
223 zope.interface and Twisted
235 zope.interface and Twisted
224 --------------------------
236 --------------------------
225
237
226 Twisted [Twisted]_ and zope.interface [ZopeInterface]_ are used for networking
238 Twisted [Twisted]_ and zope.interface [ZopeInterface]_ are used for networking
227 related things. On Unix style platforms (including OS X), the simplest way of
239 related things. On Unix style platforms (including OS X), the simplest way of
228 getting the these is to use :command:`easy_install`::
240 getting the these is to use :command:`easy_install`::
229
241
230 $ easy_install zope.interface
242 $ easy_install zope.interface
231 $ easy_install Twisted
243 $ easy_install Twisted
232
244
233 Of course, you can also download the source tarballs from the `Twisted website
245 Of course, you can also download the source tarballs from the `Twisted website
234 <twistedmatrix.org>`_ and the `zope.interface page at PyPI
246 <twistedmatrix.org>`_ and the `zope.interface page at PyPI
235 <http://pypi.python.org/pypi/zope.interface>`_ and do the usual ``python
247 <http://pypi.python.org/pypi/zope.interface>`_ and do the usual ``python
236 setup.py install`` if you prefer.
248 setup.py install`` if you prefer.
237
249
238 Windows is a bit different. For zope.interface and Twisted, simply get the latest binary ``.exe`` installer from the Twisted website. This installer includes both zope.interface and Twisted and should just work.
250 Windows is a bit different. For zope.interface and Twisted, simply get the latest binary ``.exe`` installer from the Twisted website. This installer includes both zope.interface and Twisted and should just work.
239
251
240 Foolscap
252 Foolscap
241 --------
253 --------
242
254
243 Foolscap [Foolscap]_ uses Twisted to provide a very nice secure RPC protocol that we use to implement our parallel computing features.
255 Foolscap [Foolscap]_ uses Twisted to provide a very nice secure RPC protocol that we use to implement our parallel computing features.
244
256
245 On all platforms a simple::
257 On all platforms a simple::
246
258
247 $ easy_install foolscap
259 $ easy_install foolscap
248
260
249 should work. You can also download the source tarballs from the `Foolscap
261 should work. You can also download the source tarballs from the `Foolscap
250 website <http://foolscap.lothar.com/trac>`_ and do ``python setup.py install``
262 website <http://foolscap.lothar.com/trac>`_ and do ``python setup.py install``
251 if you prefer.
263 if you prefer.
252
264
253 pyOpenSSL
265 pyOpenSSL
254 ---------
266 ---------
255
267
256 IPython requires an older version of pyOpenSSL [pyOpenSSL]_ (0.6 rather than
268 IPython requires an older version of pyOpenSSL [pyOpenSSL]_ (0.6 rather than
257 the current 0.7). There are a couple of options for getting this:
269 the current 0.7). There are a couple of options for getting this:
258
270
259 1. Most Linux distributions have packages for pyOpenSSL.
271 1. Most Linux distributions have packages for pyOpenSSL.
260 2. The built-in Python 2.5 on OS X 10.5 already has it installed.
272 2. The built-in Python 2.5 on OS X 10.5 already has it installed.
261 3. There are source tarballs on the pyOpenSSL website. On Unix-like
273 3. There are source tarballs on the pyOpenSSL website. On Unix-like
262 platforms, these can be built using ``python seutp.py install``.
274 platforms, these can be built using ``python seutp.py install``.
263 4. There is also a binary ``.exe`` Windows installer on the `pyOpenSSL website <http://pyopenssl.sourceforge.net/>`_.
275 4. There is also a binary ``.exe`` Windows installer on the `pyOpenSSL website <http://pyopenssl.sourceforge.net/>`_.
264
276
265 Dependencies for IPython.frontend (the IPython GUI)
277 Dependencies for IPython.frontend (the IPython GUI)
266 ===================================================
278 ===================================================
267
279
268 wxPython
280 wxPython
269 --------
281 --------
270
282
271 Starting with IPython 0.9, IPython has a new IPython.frontend package that has
283 Starting with IPython 0.9, IPython has a new IPython.frontend package that has
272 a nice wxPython based IPython GUI. As you would expect, this GUI requires
284 a nice wxPython based IPython GUI. As you would expect, this GUI requires
273 wxPython. Most Linux distributions have wxPython packages available and the
285 wxPython. Most Linux distributions have wxPython packages available and the
274 built-in Python on OS X comes with wxPython preinstalled. For Windows, a
286 built-in Python on OS X comes with wxPython preinstalled. For Windows, a
275 binary installer is available on the `wxPython website
287 binary installer is available on the `wxPython website
276 <http://www.wxpython.org/>`_.
288 <http://www.wxpython.org/>`_.
277
289
278 .. [Twisted] Twisted matrix. http://twistedmatrix.org
290 .. [Twisted] Twisted matrix. http://twistedmatrix.org
279 .. [ZopeInterface] http://pypi.python.org/pypi/zope.interface
291 .. [ZopeInterface] http://pypi.python.org/pypi/zope.interface
280 .. [Foolscap] Foolscap network protocol. http://foolscap.lothar.com/trac
292 .. [Foolscap] Foolscap network protocol. http://foolscap.lothar.com/trac
281 .. [pyOpenSSL] pyOpenSSL. http://pyopenssl.sourceforge.net
293 .. [pyOpenSSL] pyOpenSSL. http://pyopenssl.sourceforge.net
General Comments 0
You need to be logged in to leave comments. Login now