Home Contents Install the python interpreter and libraries in MS Windows

B Install the python interpreter and libraries in Linux

You can either install binaries from your distribution repository or download the libraries sources, compile and install. Installing from the repository is highly recommended, as compiling and installing the sources will fail if there are missing library headers in the system. If this is the case, the corresponding development libraries must be installed from your distribution repository in order to get the missing headers.

Before taking any steps to install the libraries, it is advisable to check if they are already installed.


B.1 Install from the repository


B.1.1 Installation example

Normally it will be enough to install python2.5, python2.6 or python 2.7, and the latest versions of pyQt4, scipy and pyQwt5. The other packages should be automatically installed as dependencies.

Example for distributions with apt package system (change package names depending on your distribution):

# apt-get install python2.7 python-qt4 python-scipy python-qwt5-qt4 libatlas3gf-base libfftw3-3

Packages libatlas3gf-base and libfftw3-3 above are optional and intended only to improve performance with large matrix algebra. Since the lossyfilters software works with small matrices, there will be no performace improvement using these libraries.

B.1.2 Full list of packages

The following packages must be installed in the system (note that the package names may vary from one distribution to another):

The following combinations of package versions have been tested successfully:

Optional packages with optimized libraries to increase performance of Numpy and Scipy are:

B.1.3 Notes:

  1. The python interpreter will be already installed in most linux distributions. It MUST BE python version 2.5, version 2.6 or version 2.7 . Earlier versions will not work, and version 3 is backwards incompatible.
     
  2. Qt4 library and possibly sip4 and pyQt4 will be present in linux installations having the KDE desktop (for example Kubuntu and Debian with KDE).
     
  3. In Ubuntu 10.10 Maverick and in Ubuntu 11.04 Natty, the python-qwt5-qt4 package may need to be recompiled in order to work successfully with the versions of sip and Qt4 installed in the system. See above for recompilation instructions.
     
  4. The latest numpy and scipy versions available in Ubuntu that have been tested when preparing this document (2013-06-11) are respectively 1.6.2 and 0.10.0. Earlier versions are not recommened, since the latest ones include bug fixes and funcionality enhancements that might be necessary for the correct function of the software. Install newer versions with caution, since there might be some incompatibility with pyqwt library 5.2 that may requiere recompilation of package python-qwt5-qt4.
     
    In Ubuntu 10.10 Maverick (updated 2010-11-26) the latest version of python-numpy and python-scipy packages available in the repository is respectively 1.3.0 and 0.7.2. If you wish to install newer versions, you can download them from the debian unstable or Ubuntu 11.04 Natty repositories and check dependencies to see if they are compatible with other packages in your system:
    http://ftp.de.debian.org/debian/pool/main/p/python-numpy/python-numpy_1.5.1-2+b1_amd64.deb
    http://de.archive.ubuntu.com/ubuntu/pool/main/p/python-numpy/python-numpy_1.5.1-1ubuntu2_amd64.deb
    http://ftp.de.debian.org/debian/pool/main/p/python-scipy/python-scipy_0.9.0+dfsg1-1+b2_amd64.deb
    http://de.archive.ubuntu.com/ubuntu/pool/universe/p/python-scipy/python-scipy_0.8.0+dfsg1-1ubuntu1_amd64.deb
    for 64-bit systems and
    http://ftp.de.debian.org/debian/pool/main/p/python-numpy/python-numpy_1.5.1-2+b1_i386.deb
    http://de.archive.ubuntu.com/ubuntu/pool/main/p/python-numpy/python-numpy_1.5.1-1ubuntu2_i386.deb
    http://ftp.de.debian.org/debian/pool/main/p/python-scipy/python-scipy_0.9.0+dfsg1-1+b2_i386.deb
    http://de.archive.ubuntu.com/ubuntu/pool/universe/p/python-scipy/python-scipy_0.8.0+dfsg1-1ubuntu1_i386.deb
    for 32-bit.
     
    In Ubuntu 11.04 Natty (updated 2011-05-07) the latest versions are python-numpy 1.5.1 and python-scipy 0.8.0.
     
  5. Detailed and updated instructions for installation of Numpy and Scipy with optimized linear algebra and FFTW libraries can be found in http://www.scipy.org/Installing_SciPy/Linux. The ATLAS installation web page http://math-atlas.sourceforge.net/atlas_install contains also useful information.
     
    In 2009 we prepared a script to install ATLAS in a Debian distribution:
     
    This script is now obsolete, but it is distributed with the software just in case it may be useful to somebody. It should be easy to modify the script for other distributions, following the instructions in http://www.scipy.org/Installing_SciPy/Linux and http://math-atlas.sourceforge.net/atlas_install .
     
    In Ubuntu 10.10 Maverick (and possibly 11.04 Natty), the instructions to compile ATLAS library customized for your CPU are:
     
    $ sudo apt-get build-dep libatlas3gf-base
    $ sudo apt-get install devscripts
    
    $ mkdir optim_libs
    $ cd optim_libs
    $ apt-get source libatlas3gf-base
    $ cd atlas-*
    $ fakeroot debian/rules custom
    $ cd ..
    $ sudo dpkg -i libatlas3gf-base_*.deb
    

B.2 Download, compile and install the sources

In the first place, it is necessary to have the GNU C++ compiler installed http://gcc.gnu.org/. From the repository of your distribution, install g++ (the package name may vary from one distribution to another). Other packages such as gcc and libraries should be automatically installed as dependencies.

Example for distributions with apt package system:

# apt-get install g++

It is likely that the compilation process detects missing headers (*.h C/C++ files). If this is the case, you have to find which is the development package that contains this file. For example, we found that file Xlocale.h was missing. Running

# apt-file search Xlocale.h

reported

libx11-dev: /usr/include/X11/Xlocale.h

which means that we have to install the libx11-dev library:

# apt-get install libx11-dev

Installation procedure:

  1. Python interpreter: http.//www.python.org
     
  2. PyQt GUI development: http://www.riverbankcomputing.co.uk
     
    Before you can build PyQt you must have already built and installed the Qt library, SIP and Qscintilla2:
     
    1. Qt:
       
    2. SIP:
       
    3. Qscintilla2:
       
    4. pyQt:
       
  3. Numpy and Scipy: http://www.numpy.org http://www.scipy.org.
     
    Detailed instructions for installation of Numpy and Scipy with optimized linear algebra libraries can be found in http://www.scipy.org/Installing_SciPy/Linux.
     
  4. pyQwt: http://pyqwt.sourceforge.net
     
  5. Eric development environment (OPTIONAL): http://eric-ide.python-projects.org
     

Home Contents Install the python interpreter and libraries in MS Windows