Skip to content
Brian Granger edited this page Feb 13, 2013 · 1 revision

As of version 0.12, IPython can be installed on Python 3. 2to3 will run automatically as part of the setup. All automated tests are passing, and if you install the necessary libraries, you can run the Qt console, the HTML notebook and the parallel computing framework in Python 3.

Note that IPython will install itself with the command ipython3, so you can use it alongside Python 2 IPython.

Dependencies

As of Ubuntu 12.04, the packages ipython3 and ipython3-qtconsole are available in the repositories, along with all their dependencies. 12.10 will also include ipython3-notebook.

On other systems, you can install the following libraries from PyPI:

All of these work with Python 3.

Compiling PyQt4 for older versions of Ubuntu

For the Qt console, you also need PyQt (or PySide). It's packaged for Python 3 in Ubuntu 12.04, but for older versions we have to recompile from source. You'll need to install the packages qt4-dev-tools qt4-qmake python3-dev python3-sip-dev. PyQt must match the system version of Qt, so don't download the newest version from Riverbank. Use apt-get source python-qt4, cd into the newly created python-qt4-... directory, and do:

python3 configure.py
make
sudo make install

Compiling takes a while, but when it's finished, you should be able to run the Qt console frontend (ipython3 qtconsole).

Testing & Development

A couple more tools are useful if you want to help with development:

  • IPython on Python 3 should not interfere with your main IPython installation (call ipython3 to start it). For testing, however, creating a disposable environment with Virtualenv is recommended (Virtualenv version 1.6 or later supports Python 3).
  • We use nose for the automated tests - you'll need nose 1.1.0 or newer, because of a bug in earlier versions. Nose can be installed inside a virtualenv.
Clone this wiki locally