Actions

OSX

From ACL@NCU

System

Install Homebrew on OS earlier than 10.9

ruby -e "$(curl -fsSkL raw.github.com/mistydemeo/tigerbrew/go/install)"

(in .bash_profile)
export PATH=/usr/local/sbin:/usr/local/bin:$PATH


Install pymvpa

1) Install Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install"
2) mkdir /Users/Shared/PyMVPA; cd  /Users/Shared/
3) sudo easy_install pip
4) pip install virtualenv
5) virtualenv PyMVPA
6) cd PyMVPA
7) . bin/activate
8) pip install numpy
9) pip install scipy
10) pip install nibabel
11) pip install ipython'[all]'
12) pip install scikit-learn
13) pip install matplotlib
14) brew install swig
15) Grab the PyMVPA source (and place into your virtualenv folder):

git clone git://github.com/PyMVPA/PyMVPA.git

16)Install libsvm:
brew install gnuplot
brew install qt4
brew install libsvm


17)Install PyMVPA:
make 3rd
python setup.py build_ext –with-libsvm
python setup.py install –with-libsvm
18) Download tutorial data at: http://data.pymvpa.org/datasets/haxby2001/
19) Unzip and Place data in /Users/Shared/PyMVPA/Tutorial_Data


And remember that you should cd to another directory when calling the test command:


from  mvpa2.tutorial_suite import *

Otherwise you will see the following complaint:

WARNING: Failed to load fast implementation of SMLR.  May be you forgotten to build it.  We will use much slower pure-Python version. Original exception was dlopen(mvpa2/clfs/libsmlrc/smlrc.so, 6): image not found
 * Please note: warnings are printed only once, but underlying problem might occur many times *
WARNING: SMLR: C implementation is not available. Using pure Python one

This is because when you import mvpa2 under the pymvpa source code directory (where you make it), python takes the mvpa-subdirectory as the place from where is imports the mvpa-package. This won't work, at least for SVM / SMLR, that use C-code bindings that have to be compiled (source).