Thursday, May 3, 2012

IPythonQt on Windows


[UPDATE 2013-08-30] Distribute and Setuptools have merged. See Setuptools scandal derails distribute with wheels.

IPython is a very commonly used shell instead of the default Python interpreter. One of its advantages is its Qt console which can show plots like MATLAB. Building this for Windows is pretty painless, since windows installers are provided for each dependency, however their installation documentation for Windows is not crystal clear.
  • download and install the latest version of Python-2.7 - obviously you must have Python, make sure the executable matches your system, e.g. win32 for 32-bit Windows versions
  • See the great documentation on getting pip and setuptools.
  • download ez-setup from the setuptools documentation and run it using python from a command line (you must have python on your path).
  • python ez_setup.py
    • If you are using Git Bash you can also use curl and pipe it to Python like this.
    curl -k https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python
  • get the pip-installer from pip and then run it using Python in any command shell:
  • python get-pip.py
    • If you are using Git Bash you can also use curl and pipe it to Python like this.
    curl -k https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
  • download and install the latest version of IPython - this will install the IPython interpreter, make sure the executable matches your system, e.g. win32 for 32-bit Windows versions
  • download and install the latest version of pyreadline - this is required for the IPython, make sure the executable matches your Python version and your system, e.g. win32 for 32-bit Windows versions and Python 2.7
  • download and install the latest build of PyWin32 from sourceforge.net - this is not required but is strongly encouraged, make sure the executable matches your Python version and your system, e.g. win32 for 32-bit Windows versions and Python 2.7
  • download and install the latest version of pyzmq - this is required for the Qt console, make sure the executable matches your Python version and your system, e.g. win32 for 32-bit Windows versions and Python 2.7
  • download and install the latest version of matplotlib from sourceforge.net - this is required to make plots in the Qt console., make sure the executable matches your Python version and your system, e.g. win32 for 32-bit Windows versions and Python 2.7
  • download and install the latest version of PyQt - this is also required for the Qt console, make sure the executable matches your Python version and your system, e.g. win32 for 32-bit Windows versions and Python 2.7
now you can run IPython Qt console! Happy Hacking!

No comments:

Post a Comment

Fork me on GitHub