Skip to content
This repository has been archived by the owner on Sep 23, 2019. It is now read-only.

Installation

rossant edited this page Apr 11, 2013 · 10 revisions

Installing Galry

This wiki page may be updated by users who have tips to share about the installation of Galry on specific systems.

Compatible systems

In theory, any not-too-old system should support Galry. In practice, things can be more complicated depending on the graphics card drivers, the operating system, etc. Testing on different configurations is currently performed to
be sure that Galry works on the widest range possible of systems. Users are also invited to test Galry on their configuration.

Galry has been successfully tested on the following systems so far:

  • Windows 7/8 32/64 bits with AMD/Nvidia graphics cards,
  • Ubuntu 12.04 64 bits with an Nvidia graphics card (default drivers and Nvidia drivers)
  • Ububntu 12.04 32 bits in a VirtualBox (with the Guest Additions), which has experimental support for hardware-accelerated OpenGL,
  • Mac OSX 10.6 Snow Leopard with an Nvidia graphics card.

Galry requires OpenGL 2.1 or later.

Dependencies

Galry is written for Python 2.7 and uses the following packages:

  • Numpy (tested version: 1.6.2)
  • PyOpenGL (tested version: 3.0.2)
  • Either PyQt (tested version: 4.8.6) or Pyside (tested version: 1.1.1)
  • Matplotlib (tested version: 1.1.1) (only for very specific tasks)

Galry will eventually be integrated in the IPython notebook, in which case only Numpy and Matplotlib should be required (rendering will be handled by the browser through WebGL).

Enthought Python Distribution (EPD) contains all mandatory dependencies. It is free for academics. If you install it, you just need to install galry and you should be good to go.

Installation overview

The installation of Galry involves three steps:

  • making sure that the dependencies are all correctly installed.
  • making sure the graphics card drivers support a recent enough version of OpenGL.
  • install and test Galry.

In order to install Python and the external modules, using binary packages is the simplest solution. Such (unofficial) installers are available for the most common platforms: Windows, MacOS and Linux (see below). Depending on the exact version of the operating system, some installers may not be available. In this case, it should be possible to install the Python packages directly from source. Some modules also require compilation of C or C++ code, in which case a C/C++ compiler is needed.

Installing external packages

Windows

This webpage contains an impressive number of Windows installers for popular Python packages. In particular, installers are available for all external modules used by Galry, for Windows 32 bits or Windows 64 bits.

Installing the modules using these installers is straightforward. Just make sure the Python version mentioned on the installer matches your version of Python.

OS X

Unofficial binary installers for all external modules are available on MacPorts.

Linux

Binary installers are available for Ubuntu. The following packages need to be installed:

sudo apt-get install python2.7 python-numpy python-matplotlib python-opengl python-qt4 python-qt4-gl

Installing OpenGL

OpenGL support

OpenGL support is directly provided by the graphics card drivers. You should ensure that you have the very latest drivers of your graphics card. Check your graphics card's manufacturer website.

In principle, OpenGL >= 2.1 at least is necessary, as well as GLSL version >= 1.20. Galry has been successfully tested in VirtualBox, with a Windows 8 64 bits host and Ubuntu 12.04 guest.

If you encounter some issues, you should check the version of OpenGL that is supported by your graphics card drivers. In any case, it would be a good idea to install the very latest drivers of your graphics card.

GLView is a tool for Windows and OSX which gives the version of OpenGL that is supported by the current graphics card drivers. For Linux, there's the glxinfo command (you may need to install this tool manually, on Ubuntu with the command sudo apt-get install mesa-utils.

On recent versions of Windows, only a very old version of OpenGL may be available. The reason is that Windows provides display drivers with an old implementation of OpenGL, whereas the latest OpenGL version is only provided by the graphics card manufacturer's drivers. It means that you should force Windows to use AMD or nvidia drivers (depending on which graphics card you have) instead of the default Windows drivers if you have some trouble.

You can find additional details in the introduction of this webpage.

VirtualBox

It should be possible to run Galry within a VirtualBox (I was able to do it with Windows 7 64 bits as host and Ubuntu 12.04 as guest OS). You need the Guest Additions, which has experimental support for hardware acceleration. You also need to activate 3D hardware acceleration in the VirtualBox parameters. It may also depend on your specific operating systems and your graphics card drivers.

More details are available here.

Installation procedure

  • Download the package.

  • Extract it.

  • Run in a console:

    python setup.py install
    
  • Test it:

    from galry import *
    from numpy.random import randn
    plot(randn(3, 10000))
    show()
    
  • You should see three overlayed random signals. You can navigate with the mouse and the keyboard. Press H to see all available actions.

Development version (expert users)

  • Clone the repository:

    git clone https://github.com/rossant/galry.git
    
  • Install Galry with pip so that external packages are automatically updated (like qtools which contains some Qt-related utility functions):

    pip install -r requirements.txt
    

Integration with IPython

Integrating Galry with IPython is possible but not straightforward as of now. It allows to open a Galry window in an interactive session while having access to the command line.

You can find details on this page. The proposed solution consists in first putting the following code in ~/.ipython/profile_default/ipython_config.py:

import sip
try:
    sip.setapi('QDate', 2)
    sip.setapi('QDateTime', 2)
    sip.setapi('QString', 2)
    sip.setapi('QTextStream', 2)
    sip.setapi('QTime', 2)
    sip.setapi('QUrl', 2)
    sip.setapi('QVariant', 2)
except ValueError, e:
    raise RuntimeError('Could not set API version (%s): did you import PyQt4 directly?' % e)

Then, in the same config file, ensure that the following lines are uncommented:

c.TerminalIPythonApp.gui = 'qt'
c.TerminalIPythonApp.pylab = 'qt'