Skip to content
rsignell-usgs edited this page Nov 29, 2012 · 3 revisions

#summary Hints to install octant

This page gives some hints for the installation of octant especially the not so straightforward installation of the gridgen libraries.

##Ubuntu (2011)

A successful installation of octant on an Ubuntu-System was done by installing a fresh gridgen from source and change the load_library command in grid.py. I had additionally to change the load_library command in csa.py:

  svn checkout http://gridgen-c.googlecode.com/svn/gridgen
  cd gridgen
  ./configure
  make
  make shlib
  sudo make install

You should now have a libgridgen.so in /usr/local/lib Get the octant data

 svn checkout http://octant.googlecode.com/svn/trunk/ octant-read-only
 cd octant-read-only
 cd octant

find the line in grid.py self._libgridgen = np.ctypeslib.load_library('_gridgen', octant.path[0])

and replace it with self._libgridgen = np.ctypeslib.load_library('libgridgen', '/usr/local/lib')

Now change the line in csa.py find the line

 _csa = np.ctypeslib.load_library('_csa', octant.__path__[0])

I had to replace it with an absolute path, in my case '/usr/local/lib/python2.6/dist-packages/octant/', but this will differ from installation to installation:

 _csa = np.ctypeslib.load_library('_csa','/usr/local/lib/python2.6/dist-packages/octant/')

Doing a

 python setup.py build
 sudo python setup.py install

should work now. Good luck!

##Ubuntu (2008)

To install octant on Ubuntu (8.10) do this:

  1. python-devel, liblapack-dev, (evtl. libatlas-base-dev), libpng12-dev, python-gtk2-dev, freetype, libfreetype-dev, libblas-dev

  2. Download and install numpy (svn recommended)

  3. Download and install scipy (svn recommended)

  4. Download and install matplotlib (svn recommended)

4.b) in toolkits/basemap make geos

4.c) in toolkits/basemap install basemap

  1. Download octant

5.a) in external/nn make "nn"

5.b) in external/gridutils make "gridutils"

5.c) in external/gridgen make "gridgen":

make

make lib

make shlib (this makes the shared object file needed by octant)

5.d) install octant

5.e) copy the octant/external/gridgen/libgridgen.so into the octant installation

directory (e.g. /usr/lib/python2.5/site-packages/octant)

Clone this wiki locally