User Tools

Site Tools


help:linux_installation

Contents

Non-Ubuntu/Debian Linux Installation

Introduction

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 INSTALL.sh.

  • Step 1 is to use your distro package manager to install all the required support packages e.g. matplotlib (for chart plotting). Details of required packages are in the next subsection.
  • Step 2 is to run INSTALL.sh as described in README.txt.

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 (grant@sofastatistics.com) 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 (>= 2.8.9.2), python-wxgtk2.8 (>= 2.8.9.2), python-numpy (>= 1:1.2.1), python-mysqldb (>= 1.2.2), python-psycopg2 (>= 2.0), python-matplotlib (>= 0.98.5.2), 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 - :

  • Python was already there
  • wxPython-2.8.11… and that brought with it some other packages needed.
  • numpy-1:1.4.1…
  • MySQL-python-1.2.3…
  • PyGreSQL-3.8.1… (presumably needs to change to python-psycopg2 or openSUSE equivalent)
  • python-xdg-0.15… (or a higher number e.g. 0.19 - not actually included in my tests but needed from SOFA 1.1.5 onwards)
  • python-matplotlib-1.0.0…
  • for more recent versions of fedora you will need to separately install python-matplotlib-wx (otherwise you get a message about “No module named backend_wxagg”)
  • not sure what I did about python-webkit
  • You'll need to figure out wkhtmltopdf, ghostscript, pdftk, python-pypdf, imagemagick, and python-pythonmagick. Please report back if you succeed so others can benefit.

A friend using Fedora 17 needed

  • pywebkitgtk
  • python-matplotlib-wx

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

  • python-wxGTK 2.8.10.1…
  • python-numpy (NB to upgrade the existing version 1.3… to the later education repo version 1.5… - see Python matplolib on openSUSE)
  • python-mysql 1.2.2-90.1
  • PyGreSQL 3.8.1… (presumably needs to change to python-psycopg2 or openSUSE equivalent)
  • python-matplotlib 1.0.0…
  • python-xdg-0.19… (or a higher number - not actually included in my tests but needed from SOFA 1.1.5 onwards)
  • python-webkit (upgraded)
  • python-webkitgtk 1.1.8… (to avoid error about backend_wxagg module being missing)
  • You'll need to figure out wkhtmltopdf, ghostscript, pdftk, python-pypdf, imagemagick, and python-pythonmagick. Please report back if you succeed so others can benefit.

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:

  • Name: SOFA Statistics
  • Description: Analysis package
  • Command: python /usr/local/share/sofastats/start.py
  • Icon: /usr/local/share/sofastats/images/sofa_48x48.xpm

You can run sofa from the command line with a single command sofastats (assuming you ran INSTALL.sh). 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.

Appendix

Simple Launch from Command Line

Make a text file called runsofastats.sh with the following

  
#! /bin/bash
python /usr/local/share/sofastats/start.py

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/runsofastats.sh /usr/local/bin/sofastats
chmod a+x /usr/local/bin/sofastats

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

sofastats

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):

/usr/local/share/sofastats
/usr/local/share/sofastats/boomslang
/usr/local/share/sofastats/css
/usr/local/share/sofastats/dbe_plugins
/usr/local/share/sofastats/googleapi
/usr/local/share/sofastats/googleapi/atom
/usr/local/share/sofastats/googleapi/gdata
/usr/local/share/sofastats/googleapi/gdata/docs
/usr/local/share/sofastats/googleapi/gdata/oauth
/usr/local/share/sofastats/googleapi/gdata/spreadsheet
/usr/local/share/sofastats/googleapi/gdata/tlslite
/usr/local/share/sofastats/googleapi/gdata/tlslite/integration
/usr/local/share/sofastats/googleapi/gdata/tlslite/utils
/usr/local/share/sofastats/images
/usr/local/share/sofastats/_internal
/usr/local/share/sofastats/locale
/usr/local/share/sofastats/locale/gl_ES
/usr/local/share/sofastats/locale/gl_ES/LC_MESSAGES
/usr/local/share/sofastats/projs
/usr/local/share/sofastats/reports
/usr/local/share/sofastats/reports/sofa_report_extras
/usr/local/share/sofastats/scripts
/usr/local/share/sofastats/vdts/
/usr/local/share/sofastats/xlrd/

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 runsofastats.sh /usr/local/share/sofastats

NB nothing will work without the dependencies installed. Running:

python /usr/local/share/sofastats/start.py

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.

Contents

Wiki

help/linux_installation.txt · Last modified: 2014/04/28 16:31 (external edit)