Installing pyFormex


This document is under construction


This document explains the different ways for obtaining a running pyFormex installation. You will learn how to obtain pyFormex, how to install it, and how to get it running.

Installing pyFormex-1.0.x

This installation manual is for the pyFormex 1.0 series. Installation instructions for pyFormex-0.9 can be found here.

pyFormex is being developed on GNU/Linux systems, and currently only runs on Linux. On other systems you have the option of running Linux in a virtual machine, or you can boot your machine from a USB stick with a Linux Live system.

As there has not been an official release yet of pyFormex-1.0, this manual only deals with how to run pyFormex from source, and how to install one of the alpha releases.

Whether you are running pyFormex from source or from a packaged release, there are some required packages that you need to have on your Linux system. pyFormex will not run without them. Then, there are also some recommended pacakges: these are only necessary for some applications, but not for basic pyFormex.


In order to run pyFormex, you need at least the following installed (and working) on your computer:

Python ( Version 2.7 is required. Lower versions are no longer supported. Development is ongoing to make pyFormex run on Python 3.x, but is not ready yet. Nearly all Linux distributions come with Python 2.7 installed by default (or as an option), so this should be no problem.

FreeType ( Used for rendering text. All
Linux distributions come with FreeType installed, so again here’s no problem.
NumPy (
Version 1.0 or higher. NumPy is the package used for efficient numerical array operations in Python and is essential for pyFormex.
The Python Imagaging Library. The original PIL project is no longer maintained, but the pillow fork fits in nicely.
Qt4 (
The widget toolkit on which the pyFormex Graphical User Interface (GUI) was built.
PySide (
The Python bindings for Qt4. There is an alternative set of Python bindings for Qt4: PyQt4 (, and you can use this instead. pyFormex will detect the installed one. If you have both, you can select either.
PyOpenGL (
Python bindings for OpenGL, used for drawing and manipulating the 3D-structures.

If you only want to use the Formex data model and transformation methods and do not need the GUI, then NumPy is all you need. This could e.g. suffice for a non-interactive machine that only does the numerical processing. The install procedure however does not provide this option yet, so you will have to do the install by hand. Currently we recommend to install the whole package including the GUI. Most probably you will want to visualize your structures and for that you need the GUI anyway.

In order to speed up some time-critical tasks, pyFormex has an acceleration library containing some compiled C functions. In order to install and compile these, you will need a C development environment and the required header files:

  • GNU make
  • gcc: GNU C compiler
  • header files for Python and OpenGL (e.g. from mesa)

We highly recommend that you install these to allow the acceleration library to be compiled.

Installing dependencies on Debian GNU/Linux

Debian/Ubuntu users can install the pyFormex dependencies from their distribution’s repositories. Installing the following packages should suffice: python-numpy, python-pil, python-opengl, python-qt4, python-pyside.

Also, for compiling the acceleration library, you should install python-dev and libglu1-mesa-dev. This command will do it all:

apt-get install python-numpy python-opengl python-qt4 python-pyside python-qt4-gl python-dev libglu1-mesa-dev libfreetype6-dev


Additionally, we recommend you to also install the Python and OpenGL header files. The install procedure needs these to compile the pyFormex acceleration library. While pyFormex can run without the library (Python versions will be substituted for all functions in the library), using the library will dramatically speed up some low level operations such as drawing, especially when working with large structures .

Other optional packages that might be useful are admesh, python-scipy,
units, python-vtk.