Last active
October 22, 2015 23:30
-
-
Save donovanr/59ad778f5cddc614a1c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to install the MMTK python package | |
On Mac (10.10) | |
install anaconda | |
create an environment with anaconda specifically for MMTK (needs numpy<1.9): | |
- conda create -n mmtk numpy=1.8.2 | |
active that environment | |
- source activate mmtk | |
install netcdf and cython: | |
- conda install libnetcdf | |
- conda install netcdf4 | |
- conda install cython | |
get scientificpython (NOT the same thing as scipy) | |
- hg clone https://bitbucket.org/khinsen/scientificpython | |
get mmtk | |
- hg clone https://bitbucket.org/khinsen/mmtk | |
set netcdf location in the terminal | |
- export NETCDF_PREFIX=${HOME}/anaconda/envs/mmtk | |
set the cython compilation flag | |
- export COMPILE_CYTHON=1 | |
compile scientificpython -- go to scientificpython dir and | |
- python setup.py build | |
- python setup.py install | |
cd to mmtk dir, and set (other??) cython flag: | |
- export MMTK_USE_CYTHON=1 | |
- python setup.py build | |
- python setup.py install | |
install ipython | |
- conda install ipython | |
open ipython and append the location of the MMTK shared objects to the sys.path, and remove the incorrect location | |
- import sys | |
- sys.path.append('/Users/<username>/anaconda/envs/mmtk/lib/python2.7/site-packages/MMTK/darwin') | |
- sys.path.remove('/Users/<username>/bin/mmtk/MMTK/darwin') | |
use MMTK: | |
- import MMTK | |
to get ipython notebook working, need more packages from conda: | |
- conda install pyzmq | |
- conda install jinja2 | |
- conda install tornado | |
- conda install jsonschema | |
then the following should work | |
- ipython notebook | |
On Linux | |
create numpy 1.8 environment with anaconda as above | |
get old stable mmtk: | |
https://sourcesup.renater.fr/frs/download.php/file/2716/MMTK-2.6.1.tar.gz | |
install netcdf4 libraries via anaconda, but need a version that doesn't force an update of numpy past 1.8 | |
- conda install netcdf4=1.0.8 | |
compile with cython enabled | |
need to append to sys.path: | |
sys.path.append('/net/roos/home3/zuckerman/<username>/anaconda/envs/numpy1.8/lib/python2.7/site-packages/MMTK/linux2') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment