##// END OF EJS Templates
updated installation instructions for OS X 10.5 (including readline egg and SVN 1.5 patch instructions from wiki http://ipython.scipy.org/moin/InstallationOSXLeopard
Barry Wark -
Show More
@@ -1,272 +1,286 b''
1 1 =============================
2 2 Basic installation of IPython
3 3 =============================
4 4
5 5 Installation
6 6 ============
7 7
8 8 Instant instructions
9 9 --------------------
10 10
11 11 If you are of the impatient kind, under Linux/Unix simply untar/unzip
12 12 the download, then install with 'python setup.py install'. Under
13 13 Windows, double-click on the provided .exe binary installer.
14 14
15 15 Then, take a look at Customization_ section for configuring things
16 16 optimally and `Quick tips`_ for quick tips on efficient use of
17 17 IPython. You can later refer to the rest of the manual for all the
18 18 gory details.
19 19
20 20 See the notes in upgrading_ section for upgrading IPython versions.
21 21
22 22
23 23 Detailed Unix instructions (Linux, Mac OS X, etc.)
24 24
25 25 For RPM based systems, simply install the supplied package in the usual
26 26 manner. If you download the tar archive, the process is:
27 27
28 28 1. Unzip/untar the ipython-XXX.tar.gz file wherever you want (XXX is
29 29 the version number). It will make a directory called ipython-XXX.
30 30 Change into that directory where you will find the files README
31 31 and setup.py. Once you've completed the installation, you can
32 32 safely remove this directory.
33 33 2. If you are installing over a previous installation of version
34 34 0.2.0 or earlier, first remove your $HOME/.ipython directory,
35 35 since the configuration file format has changed somewhat (the '='
36 36 were removed from all option specifications). Or you can call
37 37 ipython with the -upgrade option and it will do this automatically
38 38 for you.
39 39 3. IPython uses distutils, so you can install it by simply typing at
40 40 the system prompt (don't type the $)::
41 41
42 42 $ python setup.py install
43 43
44 44 Note that this assumes you have root access to your machine. If
45 45 you don't have root access or don't want IPython to go in the
46 46 default python directories, you'll need to use the ``--home`` option
47 47 (or ``--prefix``). For example::
48 48
49 49 $ python setup.py install --home $HOME/local
50 50
51 51 will install IPython into $HOME/local and its subdirectories
52 52 (creating them if necessary).
53 53 You can type::
54 54
55 55 $ python setup.py --help
56 56
57 57 for more details.
58 58
59 59 Note that if you change the default location for ``--home`` at
60 60 installation, IPython may end up installed at a location which is
61 61 not part of your $PYTHONPATH environment variable. In this case,
62 62 you'll need to configure this variable to include the actual
63 63 directory where the IPython/ directory ended (typically the value
64 64 you give to ``--home`` plus /lib/python).
65 65
66 66
67 67 Mac OSX information
68 68 -------------------
69 69
70 70 Under OSX, there is a choice you need to make. Apple ships its own build
71 of Python, which lives in the core OSX filesystem hierarchy. You can
71 of Python, which lives in the core OSX filesystem hierarchy (/System/Library/Frameworks/Python.framework). You can
72 72 also manually install a separate Python, either purely by hand
73 (typically in /usr/local) or by using Fink, which puts everything under
74 /sw. Which route to follow is a matter of personal preference, as I've
75 seen users who favor each of the approaches. Here I will simply list the
76 known installation issues under OSX, along with their solutions.
73 (typically in /usr/local), by using Fink or DarwinPorts, which put everything under /sw or /opt respectively, or using the python.org "Framework" python, which installs a framework similar to the system python in /Library/Frameworks. The Enthought Python Distribution (http://www.enthought.com/products/epd.php), uses the python.org "Framework" python and thus also installs into /Library/Frameworks. Which route to follow is a matter of personal preference, as I've seen users who favor each of the approaches.
74
75 For users of OS X 10.5 (Leopard), the system python installation contains support for `DTrace`_, a kernel-level profiling system integrated into OS X 10.5. This facility provides significant advantage to developers and users interested in high-performance computing by using the system python.
76
77 .. _DTrace: http://www.apple.com/macosx/technology/unix.html
78
79 IPython is known to work with all the above installation options. As such, we do not endorse one choice over the others. Here we will simply list the known installation issues under OSX, along with their solutions.
77 80
78 81 This page: http://geosci.uchicago.edu/~tobis/pylab.html contains
79 82 information on this topic, with additional details on how to make
80 83 IPython and matplotlib play nicely under OSX.
81 84
82 To run IPython and readline on OSX "Leopard" system python, see the
83 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard
84
85 85
86 GUI problems
87 ------------
86 GUI problems (older versions of OS X)
87 -------------------------------------
88 88
89 The following instructions apply to an install of IPython under OSX from
90 unpacking the .tar.gz distribution and installing it for the default
91 Python interpreter shipped by Apple. If you are using a fink install,
92 fink will take care of these details for you, by installing IPython
93 against fink's Python.
89 The following instructions apply to an install of IPython under OSX before OS X 10.5 (users of OS X 10.5 see [#]_ ) by unpacking the .tar.gz distribution and installing it for the default Python interpreter shipped by Apple. If you are using a fink or DarwinPorts install, they will take care of these details for you, by installing IPython against their Python.
94 90
95 91 IPython offers various forms of support for interacting with graphical
96 92 applications from the command line, from simple Tk apps (which are in
97 93 principle always supported by Python) to interactive control of WX, Qt
98 94 and GTK apps. Under OSX, however, this requires that ipython is
99 95 installed by calling the special pythonw script at installation time,
100 96 which takes care of coordinating things with Apple's graphical environment.
101 97
102 98 So when installing under OSX, it is best to use the following command::
103 99
104 100 $ sudo pythonw setup.py install --install-scripts=/usr/local/bin
105 101
106 or
102 or::
107 103
108 104 $ sudo pythonw setup.py install --install-scripts=/usr/bin
109 105
110 106 depending on where you like to keep hand-installed executables.
111 107
112 108 The resulting script will have an appropriate shebang line (the first
113 109 line in the script whic begins with #!...) such that the ipython
114 110 interpreter can interact with the OS X GUI. If the installed version
115 111 does not work and has a shebang line that points to, for example, just
116 112 /usr/bin/python, then you might have a stale, cached version in your
117 113 build/scripts-<python-version> directory. Delete that directory and
118 114 rerun the setup.py.
119 115
120 116 It is also a good idea to use the special flag ``--install-scripts`` as
121 117 indicated above, to ensure that the ipython scripts end up in a location
122 118 which is part of your $PATH. Otherwise Apple's Python will put the
123 119 scripts in an internal directory not available by default at the command
124 120 line (if you use /usr/local/bin, you need to make sure this is in your
125 121 $PATH, which may not be true by default).
126 122
123 .. [#] Users of OS X 10.5 who choose to use the system-installed python should install IPython using ``sudo python setupegg.py install`` from the IPython source directory or from `PyPI`_ using ``sudo easy_install ipython``.
124
125 .. _PyPI: http://pypi.python.org/pypi
127 126
128 127 Readline problems
129 128 -----------------
130 129
131 By default, the Python version shipped by Apple does not include the
132 readline library, so central to IPython's behavior. If you install
130 By default, the Python version shipped by Apple before OS X 10.5 does not include the readline library, so central to IPython's behavior. If you install
133 131 IPython against Apple's Python, you will not have arrow keys, tab
134 132 completion, etc. For Mac OSX 10.3 (Panther), you can find a prebuilt
135 133 readline library here:
136 134 http://pythonmac.org/packages/readline-5.0-py2.3-macosx10.3.zip
137 135
138 136 If you are using OSX 10.4 (Tiger), after installing this package you
139 137 need to either:
140 138
141 139 1. move readline.so from /Library/Python/2.3 to
142 140 /Library/Python/2.3/site-packages, or
143 141 2. install http://pythonmac.org/packages/TigerPython23Compat.pkg.zip
144 142
145 Users installing against Fink's Python or a properly hand-built one
146 should not have this problem.
147 143
144 Beginning with OS X 10.5, Apple's python installation uses libedit, a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9, many of the issues related to the differences between readline and libedit have been resolved. If you find that you are experiencing readline-related issues (e.g. problems with tab-completion, history movement, or line editing), you can install Ludwig Schwartz's readline package which effectively replaces libedit with readline for packages installed via setuptools. If you installed IPython from the source directory using::
145
146 sudo python setupegg.py
147
148 or from PyPI with::
149
150 sudo easy_install ipython
151
152 then you can install the readline egg via [#]_::
153
154 sudo easy_install readline
155
156 If needed, the readline egg can be build and installed from source (see the
157 wiki page at http://ipython.scipy.org/moin/InstallationOSXLeopard).
158
159 Users installing against Fink or DarwinPorts's Python or a properly hand-built python installation should not have this problem.
160
161 .. [#] If you have installed SVN 1.5, you will also to install a patch to setuptools before installing the readline egg. Use ``sudo easy_install http://www.jaraco.com/ASP/eggs/setuptools-0.6c8_svn15fix.egg``.
148 162
149 163 DarwinPorts
150 164 -----------
151 165
152 166 I report here a message from an OSX user, who suggests an alternative
153 167 means of using IPython under this operating system with good results.
154 168 Please let me know of any updates that may be useful for this section.
155 169 His message is reproduced verbatim below:
156 170
157 171 From: Markus Banfi <markus.banfi-AT-mospheira.net>
158 172
159 173 As a MacOS X (10.4.2) user I prefer to install software using
160 174 DawinPorts instead of Fink. I had no problems installing ipython
161 175 with DarwinPorts. It's just:
162 176
163 177 sudo port install py-ipython
164 178
165 179 It automatically resolved all dependencies (python24, readline,
166 180 py-readline). So far I did not encounter any problems with the
167 181 DarwinPorts port of ipython.
168 182
169 183
170 184
171 185 Windows instructions
172 186 --------------------
173 187
174 188 Some of IPython's very useful features are:
175 189
176 190 * Integrated readline support (Tab-based file, object and attribute
177 191 completion, input history across sessions, editable command line,
178 192 etc.)
179 193 * Coloring of prompts, code and tracebacks.
180 194
181 195 .. _pyreadline:
182 196
183 197 These, by default, are only available under Unix-like operating systems.
184 198 However, thanks to Gary Bishop's work, Windows XP/2k users can also
185 199 benefit from them. His readline library originally implemented both GNU
186 200 readline functionality and color support, so that IPython under Windows
187 201 XP/2k can be as friendly and powerful as under Unix-like environments.
188 202
189 203 This library, now named PyReadline, has been absorbed by the IPython
190 204 team (JΓΆrgen Stenarson, in particular), and it continues to be developed
191 205 with new features, as well as being distributed directly from the
192 206 IPython site.
193 207
194 208 The PyReadline extension requires CTypes and the windows IPython
195 209 installer needs PyWin32, so in all you need:
196 210
197 211 1. PyWin32 from http://sourceforge.net/projects/pywin32.
198 212 2. PyReadline for Windows from
199 213 http://ipython.scipy.org/moin/PyReadline/Intro. That page contains
200 214 further details on using and configuring the system to your liking.
201 215 3. Finally, only if you are using Python 2.3 or 2.4, you need CTypes
202 216 from http://starship.python.net/crew/theller/ctypes(you must use
203 217 version 0.9.1 or newer). This package is included in Python 2.5,
204 218 so you don't need to manually get it if your Python version is 2.5
205 219 or newer.
206 220
207 221 Warning about a broken readline-like library: several users have
208 222 reported problems stemming from using the pseudo-readline library at
209 223 http://newcenturycomputers.net/projects/readline.html. This is a broken
210 224 library which, while called readline, only implements an incomplete
211 225 subset of the readline API. Since it is still called readline, it fools
212 226 IPython's detection mechanisms and causes unpredictable crashes later.
213 227 If you wish to use IPython under Windows, you must NOT use this library,
214 228 which for all purposes is (at least as of version 1.6) terminally broken.
215 229
216 230
217 231 Installation procedure
218 232 ----------------------
219 233
220 234 Once you have the above installed, from the IPython download directory
221 235 grab the ipython-XXX.win32.exe file, where XXX represents the version
222 236 number. This is a regular windows executable installer, which you can
223 237 simply double-click to install. It will add an entry for IPython to your
224 238 Start Menu, as well as registering IPython in the Windows list of
225 239 applications, so you can later uninstall it from the Control Panel.
226 240
227 241 IPython tries to install the configuration information in a directory
228 242 named .ipython (_ipython under Windows) located in your 'home'
229 243 directory. IPython sets this directory by looking for a HOME environment
230 244 variable; if such a variable does not exist, it uses HOMEDRIVE\HOMEPATH
231 245 (these are always defined by Windows). This typically gives something
232 246 like C:\Documents and Settings\YourUserName, but your local details may
233 247 vary. In this directory you will find all the files that configure
234 248 IPython's defaults, and you can put there your profiles and extensions.
235 249 This directory is automatically added by IPython to sys.path, so
236 250 anything you place there can be found by import statements.
237 251
238 252
239 253 Upgrading
240 254 ---------
241 255
242 256 For an IPython upgrade, you should first uninstall the previous version.
243 257 This will ensure that all files and directories (such as the
244 258 documentation) which carry embedded version strings in their names are
245 259 properly removed.
246 260
247 261
248 262 Manual installation under Win32
249 263 -------------------------------
250 264
251 265 In case the automatic installer does not work for some reason, you can
252 266 download the ipython-XXX.tar.gz file, which contains the full IPython
253 267 source distribution (the popular WinZip can read .tar.gz files). After
254 268 uncompressing the archive, you can install it at a command terminal just
255 269 like any other Python module, by using 'python setup.py install'.
256 270
257 271 After the installation, run the supplied win32_manual_post_install.py
258 272 script, which creates the necessary Start Menu shortcuts for you.
259 273
260 274
261 275 .. upgrading:
262 276
263 277 Upgrading from a previous version
264 278 ---------------------------------
265 279
266 280 If you are upgrading from a previous version of IPython, you may want
267 281 to upgrade the contents of your ~/.ipython directory. Just run
268 282 %upgrade, look at the diffs and delete the suggested files manually,
269 283 if you think you can lose the old versions. %upgrade will never
270 284 overwrite or delete anything.
271 285
272 286
General Comments 0
You need to be logged in to leave comments. Login now