INSTALLING THE PYTHON EXTENSION


The python extension is only available for unix like systems (linux, osX,...).

Prerequisites

You must previously build and install the library (instructions).

To install this module you must have the libraries numpy and Cython installed in python.

You can install very easily both libraries using the command pip.

Install

Windows

Currently this python extension is not available for Windows operating systems.

Linux

If you have manually installed ATLAS (instead of using the apt-get command), you must tell the installation directory by defining the environment variable ATLASDIR:

  • export ATLASDIR=/path/to/atlas/

After that, you can easily install this python module (If you need sudo permission you have to use the parameter -E to keep the environment variable):

  • sudo -E python setup.py install

OSX

You must define some enviroment variables:

CC to tell the compiler (you must use the same compiler that you used to build the library). For example, if you used gcc 6 installed with homebrew:

  • export CC=/usr/local/Cellar/gcc/6.2.0/bin/gcc-6

If veclib is not in the default directory (it is highly unlikely) you must define the environment variable VECLIBDIR telling where veclib is:

  • export VECLIBDIR=/path/to/veclib

Your compiler has the openmp functions in the libgomp library, you must define an enviroment variable called LIBGOMP_PATH telling where is the file libgomp.a in the lib directory of your compiler. In the case of gcc 6 installed with homebrew:

  • export LIBGOMP_PATH=/usr/local/Cellar/gcc/6.2.0/lib/gcc/6/libgomp.a

To avoid that Cython could use any posible flag only available for clang it is better to set the CFLAGS environment variable to an empty value:

  • export CFLAGS=

With these environment variables well defined you can install the extension (If you need sudo permission you have to use the parameter -E to keep the environment variables):

  • sudo -E python setupOSX.py install


Copyright © 2014-2017