-
Notifications
You must be signed in to change notification settings - Fork 11
Installing ToFu on Mac OSX
This is a quick tutorial on how to install and use ToFu on Mac OSX.
We will use Miniconda (light version of Anaconda, but you can also work with Anaconda) to install and manage the packages necessary for installing ToFu.
- Get the latest version and install it.
- Follow the directions (you can use default options)
You can choose Mac's default Terminal
but we recommend to use iTerm
for a more complete terminal:
conda install -c tofuproject tofu
- Create a ssh public key and add it to your GitHub account: follow this tutorial.
- Go to ToFu's GitHub repository: here.
- Click on "clone or download" and swith to the option "Use SSH". Copy the link.
- Move to where you would like to install ToFu
$ export TOFU_DIR=<the path where you want to install ToFu>
$ cd $TOFU_DIR
- Clone the repository
$ git clone git@github.com:ToFuProject/tofu.git
We are going to create an environment specific for ToFu.
$ conda create -n tofu3 python=3.6 gcc scipy numpy cython git pandas
$ conda activate tofu3
This creates a conda environment named "tofu3" and installs gcc, scipy, numpy and cython. The second command activates this environment.
Note: We also included gcc
as homebrew
's version doesn't work well with OpenMP
. It will compile and run the library without any issues but you the unit tests
will fail when there was a reduction in the computation. Make sure you are using the right version of gcc
by doing which gcc
, you should get something among the lines: /Users/<username>/anaconda3/envs/<yourenv>/bin/gcc
.
$ cd $TOFU_DIR
$ python setup.py build_ext --install
$ nosetest