1. I installed GSL
2. I tested GSL
gcc -Wall -c gsltest.c
gcc gsltest.o -lgsl -lgslcblas -lm
./a.out
You should get something like J0(5) = -1.775967713143382920e-01 returned.
3. Download and install mlpy
This is where most of us seem to have had problems. As I'm relatively inexperienced at compiling from scratch I don't like manually editing files as suggested by Yotam. Any time I have tried this I wasted ages and it didn't work.
The instructions on installing mlpy presume that you have some knowledge of how to compile from scratch. This confused me as the commands are given out of order.
The part "python setup.py build_ext --include-dirs=/path/to/header --rpath=/path/to/lib" means that you need explain where your blasted GSL installation is !
easiest way to find this is to run :
sudo find / -type f -name "*gsl*"
You will see a folder with lots of .h files fill this path into /path/to/header
The folder with libgsl.a is the /path/to/lib folder
I ran python setup.pyt build_ext with both these folders.
Next I ran which python to find where my particular python install was.
for me i get /Users/USERNAME/venv/base/bin/python
the path I needed is this but with the bin removed -->
So i ran python setup.py install --prefix=/Users/USERNAME/venv/base
lastly the instructions explain that you need to tell python where to look for this package in order to use it.
It suggests export PYTHONPATH=$PYTHONPATH:/path/to/modules/lib/python{version}/site-packages
so for me this would be export PYTHONPATH=$PYTHONPATH:/Users/USERNAME/venv/base/lib/python2.7/site-packages
It didn't work. gls is in a folder called mlpy within the site-packages folder. so I actually needed
PYTHONPATH=$PYTHONPATH:/Users/USERNAME/venv/base/lib/python2.7/site-packages/mlpy.
It worked . black cloud.