wiki:InstallWindowsGohlke

Installing current development version of ANUGA research code on Windows using Gohlke Binaries

Introduction

anuga is developed on Linux (Ubuntu) and hence the installation on Linux (Ubuntu) is more streamlined. But it is possible to install on windows. First you need to install the required python environment, then download the anuga source and then compile and test. The most time consuming part of the process is getting the python environment setup.

We use python as our programming environment together with a number of standard python packages such as numpy, scipy, matplotlib, netcdf4, gdal, nose. One way to install all the required packages is to use the standard python distribution an then install pre-compiled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs.

Python

Download and run the Python 2.7 installer. (allow python.exe to be added to the path in the installation options)

Be sure to choose the win32 python 2.7 version. This is the version for which we are developing.

At the moment anuga has memory problems with win64 so avoid that for the time being. You are most welcome to help track down the problems and provide a bug fix :-).

Anuga python package dependencies

We need to download a number of pre-compiled python packages.

Download the following whl files:

From http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy download numpy‑1.9.2+mkl‑cp27‑none‑win32.whl

From http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy download scipy‑0.15.1‑cp27‑none‑win32.whl

From http://www.lfd.uci.edu/~gohlke/pythonlibs/#netcdf4 download netCDF4‑1.1.7‑cp27‑none‑win32.whl

From http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib download matplotlib‑1.4.3‑cp27‑none‑win32.whl

From http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal download GDAL‑1.11.2‑cp27‑none‑win32.whl

From http://www.lfd.uci.edu/~gohlke/pythonlibs/#nose download nose‑1.3.4‑py2‑none‑any.whl

From the directory where you have downloaded the whl files. At the cmd line

pip install numpy‑1.9.2+mkl‑cp27‑none‑win32.whl
pip install scipy‑0.15.1‑cp27‑none‑win32.whl
pip install netCDF4‑1.1.7‑cp27‑none‑win32.whl
pip install matplotlib‑1.4.3‑cp27‑none‑win32.whl
pip install GDAL‑1.11.2‑cp27‑none‑win32.whl
pip install nose‑1.3.4‑py2‑none‑any.whl

GCC compiler

We need a gcc compiler with openmp support to install anuga.

We suggest that you download and install the version of MinGW provided by TDM-GCC. Mark the openmp and gfortran options in the "Choose Components" part of the installation.

We need to force the python installation scripts to use this compiler. Add a configuration file named pydistutils.cfg to your home directory C:\Users\yourName with the contents

[build]
compiler=mingw32

Installing ANUGA via pip

You should now have all the dependencies installed. You should fire up a new cmd.exe and install anuga

You can just install the anuga library using pip or download the full repo with example code and manual using git.

pip install

If just want the latest released version of the package then use pip via

pip install anuga

If the install is successful, test the install via

python -c "import anuga; anuga.test()"

Install current development version

Git

Our preferred method of obtaining the most current version of anuga is to use git (Though you can use subverson or download a zipped file).

Download and run the windows git installer

Clone anuga via git

We need to obtain (clone) the anuga source code.

To obtain the anuga repo from github use git clone i.e. from a new cmd line run the command

git clone https://github.com/GeoscienceAustralia/anuga_core.git

Build and Install ANUGA

You should now have an anuga_core directory.

Now go to the directory anuga_core and build and install anuga. Change to the anuga_core directory and run

python setup.py install

Hopefully no errors.

Run Unit tests

From the anuga_core directory run the unit tests via:

python runtests.py

Conclusion

Hopefully all the unit tests pass. As this is bleeding edge there are sometimes a small number of failures as this is a work in progress. Have a look at the examples in the directory anuga_core/examples (along with the user manual in anuga_core/doc) to see how to use anuga.

Updating

From time to time you should update your version of anuga. This is fairly easy if you used subversion or git to obtain the source. You will then just need to pull (with git) or update (with subversion).

I.e. if using git fire up cmd.exe, change into the anuga_core directory and run

git pull

Then re-install the latest version of the code and check the unit tests via

python setup.py install
python runtests.py
Last modified 10 years ago Last modified on May 4, 2015, 10:39:26 AM