Showing posts with label suse scipy python. Show all posts
Showing posts with label suse scipy python. Show all posts

Monday, 12 January 2009

Installing Scipy etc

Suse 10.3, beans. The rpms have been downloaded already.

Install gcc42-fortran from repository. (no help, exlude next time)
Install gcc-fortran from repository. (essential)
$ rpm -i bzr-1.6.1-0.pm.1.x86_64.rpm

libgfortran41 was essential. Oddly, libgfortran42 did not satisfy.
blas and libblas3 were installed (reported by yast). Removed them,
along with matplotlib, numpy, scipy (none of which worked).

# rpm -i refblas3-3.0-11.1.x86_64.rpm

now worked.

# rpm -i lapack3-3.0-19.1.x86_64.rpm

worked.

# rpm -i python-configobj-4.5.2-0.pm.1.x86_64.rpm
didn't work. there was a newer version already. left as was.

rpm -i python-numpy-1.0.4-4.1.x86_64.rpm
worked

rpm -i python-scipy-0.6.0-2.1.x86_64.rpm
worked

python-numeric was installed with yast

python-gtk and python-gtk-devel were installed with yast.

rpm -i python-matplotlib-0.91.2-0.pm.1.x86_64.rpm

worked.

import numpy, scipy still fails. A working numpy shows
>>> print numpy.__file__
'/usr/local/lib/python2.5/site-packages/numpy/__init__.pyc'

and that's not part of $PATH, nor $PYTHONPATH. How is Python
getting to it?

Suse is installing python packages to directories with 64 appended. Python's search path uses the non-64 version, so no installed packages
are found. The readline error maybe indicative of this.

The 64 bit paths can be added to PYTHONPATH, or directly added by
editing the site.py file. (http://docs.python.org/install/index.html).

I'll update PYTHONPATH, to include in particular, /usr/lib64/python

sys.path shows the search path. I copied it's contents into PYTHONPATH as defined in .bashrc, and changed the entries to 64 versions.

/usr/local/lib64 is empty and should be /usr/lib64/
In fact, removing /local/ from all the python paths including 64, fixed readline, numpy and scipy. Job done.

Summary:
Suse10.3 was installing to /usr/lib64/python/site-packages
but the default pythonpath (in sys.path) did not use this path. The
paths in sys.path were added to PYTHONPATH in .bashrc, and modified to use /usr/lib64/.