-
Notifications
You must be signed in to change notification settings - Fork 11
Installing tofu on windows
Laura S. Mendoza edited this page Aug 30, 2019
·
2 revisions
This is a quick tutorial on how to install and use ToFu on Windows. It supposes you are an absolute beginner in coding. If you have some experience you can probably skip some steps.
We will use Miniconda (light version of Anaconda, but you can also work with Anaconda) not only to install and manage the packages necessary for installing ToFu, but also to have a working bash-like Terminal.
- Get the latest version and install it.
- Follow the directions (you can use default options)
- Open an
Anaconda prompt
We are going to create an environment specific for ToFu.
$ conda create -n tofu3 python=3.6 scipy numpy cython git pandas
$ conda activate tofu3
$ conda install m2-base # Get some basic Linux/bash commands (ls, cd, mv, ...)
This creates a conda environment named "tofu3" and installs scipy, numpy and cython. The second command activates this environment.
- 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
$ cd some_path
-
$ git clone [email protected]:ToFuProject/tofu.git
(make sure you remember the path where you are installing, if you want to install it into your home repository, just make sure tocd ~
before thegit clone...
)
- Move to the tofu directory, probably:
cd ~/tofu
- Switch to the
git
branch you will be working on. If you are just starting you probably want to start from the latest develop branch:git checkout devel
. If you are not familiar with git take a look at this tutorial (long) or this short one - Compile
python setup.py build_ext --inplace
- We suggest you installing python inside
tofu/usr
, you will have to modify your$PYTHONPATH
to include this path. How to modify environment variables on Windows python setup.py install --prefix=$TOFU_DIR\\usr
- Make sure tests are running
nosetests
If you wish to contribute, you will probably need a text editor, you can use Visual Studio's editor.