Table of Contents


Non-Ubuntu/Debian Linux Installation


Deb packages are supplied for download on the main SOFA website. To cater to other flavours of Linux, a tar.gz is also provided. Inside, you will find README.txt and

The process is quite simple and has been achieved in two very different distros. SOFA works on Fedora 14:

and openSUSE 11.3:

This page is the go-to place for information on how to successfully install SOFA on non-Ubuntu Linux systems. For direct discussion, please post at SOFA Statistics google discussion group.

And if you manage to get SOFA working on other distros please email me ( the relevant package details etc and a screen-shot (preferably one which reveals the distro involved).

Packages Required (Dependencies)

NOTE to self - keep README.txt up-to-date in /home/g/projects/SOFA/debmaker/KEEPME

UPDATE - now using python-psycopg2 instead of python-pygresql

UPDATE - now need some others to enable exporting of images. And changed from urllib to requests. See Ubuntu details below:

In Ubuntu SOFA now requires:

Depends: python (>= 2.6.2), python-wxversion (>=, python-wxgtk2.8 (>=, python-numpy (>= 1:1.2.1), python-mysqldb (>= 1.2.2), python-psycopg2 (>= 2.0), python-matplotlib (>=, python-webkit (>= 1.0.0), python-xdg (>= 0.15), wkhtmltopdf (>= 0.9.9), ghostscript (>= 9), pdftk (>= 1.44), python-pypdf (>= 1.12), imagemagick (>= 7:6), python-pythonmagick (>=0.9), python-requests

In Fedora 14 I installed the following successfully for older versions of SOFA - :

A friend using Fedora 17 needed

In openSUSE 11.3 I installed the following successfully AFTER I had added the community devel:languages:python and education repositories:

I expect in other major distros there is a similar process of finding packages that seem right, trying, and adding more if necessary. It certainly should be possible to get SOFA working on the major distros.

Running SOFA

Make a launcher with the following details:

You can run sofa from the command line with a single command sofastats (assuming you ran If you want to set it up manually, details are in the Appendix:

Installation and Configuration for Specific User

When SOFA is run, it checks to see if the user has a sofastats folder and adds it if they don't e.g. /home/username/Documents/sofastats. It also make a sofastats_recovery folder.

If you are able to get SOFA to launch at all, but there is a problem of some sort, look at the output.txt file in your /home/username/Documents/sofastats/_internal folder. It may be, for example, that you forgot to install matplotlib.


Simple Launch from Command Line

Make a text file called with the following

#! /bin/bash
python /usr/local/share/sofastats/

And save it e.g. to your home folder. If bash is not located in /bin/bash on your system, use the command

which bash 

to find it.

Then make a symlink to it located in /usr/local/bin (NB give everyone rights to run it)

su root
ln -s /home/username/ /usr/local/bin/sofastats
chmod a+x /usr/local/bin/sofastats

Now you can run SOFA Statistics from the command line by typing in


See Linux by example - how to create symlink?

File Locations

Here is where things should go during installation (in Ubuntu it is /usr/share/pyshared/sofastats):


In the following example, I downloaded the sofa source code into the Downloads folder in Fedora 14.

Then extract contents of sofastats_1.1.5.tar.gz into the Downloads folder.

The next lot of commands were performed as root (NB the /* after sofa.main)

su root
cd Downloads/sofa/sofastats_1.1.5
cp -r sofastats /usr/local/share
cp -r sofa.main/* /usr/local/share/sofastats
cp /usr/local/share/sofastats

NB nothing will work without the dependencies installed. Running:

python /usr/local/share/sofastats/

will return a traceback because wxversion or whatever isn't available. So the next step is installing the dependencies.

After installing wxPython, but before adding the other dependencies, running sofa prematurely will result in a message about a problem with the first round of local importing.