next up previous
Next: Initial configuration of your Up: IPython An enhanced Interactive Previous: Overview

Subsections


Installation

Instant instructions

If you are of the impatient kind, simply untar/unzip the download, install with 'python setup.py install' under Linux/Unix or by double-clicking the setup.py file under Windows, and take a look at Sections 3 for configuring things optimally and 4 for quick tips on efficient use of IPython. You can later refer to the rest of the manual for all the gory details.

See the notes in sec. 2.4 for upgrading IPython versions.

Under Unix-type operating systems (Linux, Mac OS X, etc.)

For RPM based systems, simply install the supplied package in the usual manner. If you download the tar archive, the process is:

  1. Unzip/untar the IPython-XXX.tar.gz file wherever you want (XXX is the version number). It will make a directory called IPython-XXX. Change into that directory where you will find the files README and setup.py. Once you've completed the installation, you can safely remove this directory.
  2. If you are installing over a previous installation of version 0.2.0 or earlier, first remove your $HOME/.ipython directory, since the configuration file format has changed somewhat (the '=' were removed from all option specifications). Or you can call ipython with the -upgrade option and it will do this automatically for you.
  3. IPython uses distutils, so you can install it simply by typing at the system prompt (don't type the $)
    $ python setup.py install
    Note that this assumes you have root access to your machine. If you don't have root access or don't want IPython to go in the default python directories, you'll need to use the -home option. For example:
    $ python setup.py install -home $HOME/local
    will install2 IPython into $HOME/local and its subdirectories (creating them if necessary).
    You can type
    $ python setup.py -help
    for more details.

RedHat 7.x notes

The problems discussed in this section do not apply to RedHat 8.0 and newer versions, only to the 7.x series.

RedHat made the 'wise' choice of using Python 1.5.2 as the default standard even for users (not just for internal system stuff). Since they couldn't be bothered to make things right, now you need to manually play around to get things to work with Python 2.x (which IPython requires).

First, your system administrator may have fixed things so that as a user you automagically see python 2.x. Test this by typing 'python' at the prompt. If you get a Python 2.x prompt, you're safe. Otherwise you'll need to explicitly call Python2.

Start by making sure you did install Python 2.x. The rpm for it is named python2....rpm. You can check by typing 'python2' at the command prompt and seeing if you get a python prompt with 2.x as the version. If you don't have it, install the Python 2.x rpm now.

Once you have confirmed you have Python 2.x installed, call the IPython setup routine as
$ python2 setup.py install

Hopefully, things will work. If they don't, go yell at RedHat, not me. One possible manual fix you may try is to edit /usr/bin/ipython and rename the #!/usr/bin/python line at the top to #!/usr/bin/python2.

Mac OSX notes

Apparently the problems which Mac OSX users may encounter with in the terminal window are due to poor VT100 emulation on Apple's part.

I don't have access to a Mac, so I rely on the helpful users from the OSX community for feedback on this issue. The information below was graciously provided by Andrea Riciputti from the Fink project, and I reproduce it unaltered hoping that it will be useful to others. If you find a mistake/update to this information, please let me know so that I can include it in future releases.

Note: I don't know if this information applies to 10.2 (Jaguar). It is possible that 10.2 fixes these problems, but this information has not been confirmed. Please let me know of any details concerning Jaguar which should be added to this documentation.

Many thanks to Andrea for taking the time to do this. His Mini-HOWTO follows.

Mac OSX Terminal Mini-HOWTO

From: Andrea Riciputi <andrea.riciputi@libero.it>

Date: Thu, 28 Nov 2002 19:07:20 +0100

1) In order to get IPython works smoothly on MacOSX you have to reset the TERM env variable as follow:

% setenv TERM xterm

2) Done. Open a new terminal window and start ipython setting color and color_info to 1. Everything will go well!!

3) If someone wants to know more about this topics please look at these links:

http://www.nyangau.fsnet.co.uk/terminfo/terminfo.htm (not so easy)

http://www.cs.utk.edu/~shuford/terminal/vt100_colorized_termcap.tx (not easy at all)

Under Windows

Please note that for the automatic installer to work you need Mark Hammond's PythonWin extensions (and they're great for anything Windows-related anyway, so you might as well get them). If you don't have them, get them at:

http://starship.python.net/crew/mhammond/

From the download directory grab the IPython-XXX.zip file (but the popular WinZip handles .tar.gz files perfectly, so use that if you have WinZip and want a smaller download).

Unzip it and double-click on the setup.py file. A text console should open and proceed to install IPython in your system. If all goes well, that's all you need to do. You should now have an IPython entry in your Start Menu with links to IPython and the manuals.

If you don't have PythonWin, you can:

These steps are basically what the auto-installer does for you.

IPython tries to install the configuration information in a directory named .ipython located in your 'home' directory, which it determines by joining the environment variables HOMEDRIVE and HOMEPATH. This typically gives something like C:\Documents and Settings\YourUserName, but your local details may vary. In this directory you will find all the files that configure IPython's defaults, and you can put there your profiles and extensions. This directory is automatically added by IPython to sys.path, so anything you place there can be found by import statements.


Upgrading from a previous version

If you are upgrading from a previous version of IPython, after doing the routine installation described above, you should call IPython with the -upgrade option the first time you run your new copy. This will automatically update your configuration directory while preserving copies of your old files. You can then later merge back any personal customizations you may have made into the new files. It is a good idea to do this as there may be new options available in the new configuration files which you will not have.

Under Windows, if you don't know how to call python scripts with arguments from a command line, simply delete the old config directory and IPython will make a new one. Win2k and WinXP users will find it in C:\Documents and Settings\YourUserName\.ipython, and Win 9x users under C:\Program Files\IPython\.ipython.


next up previous
Next: Initial configuration of your Up: IPython An enhanced Interactive Previous: Overview
Fernando Perez 2003-08-25