Contents
AnuGA_ is a python package with some C extensions (and an optional fortran extension). At present AnuGA has only been run and tested using python 2.x. We recommend python 2.7.
If you have a python 2.7 environment with gcc and gfortran support, then you can use pip to install the latest release version of AnuGA:
pip install anuga
You might want to install the dependencies via ubuntu apt-get
or conda install
to download pre-compiled versions of the dependencies. See below.
AnuGA requires the following packages:
AnuGA is developed on Ubuntu. The preferred way to install the dependencies is
to use the standard ubuntu apt-get
method.
We have a script in the tools
directory,
install_ubuntu.sh
which when run from the anuga_core
directory will install AnuGA and all the dependencies using apt-get
.
For extended instructions checkout the wiki page install ANUGA on Ubuntu
An alternative is to install the dependencies using the Anaconda or the Miniconda Python distributions by Continuum Analytics.
Miniconda has the advantage of allowing you to create multiple python environments and is particularly useful if you want to keep multiple versions of AnuGA.
Both Anaconda and Miniconda do not require administrative rights to your computer and do not interfere with the Python installed in your system.
Once you have downloaded and installed Anaconda or Miniconda
open a terminal (or cmd.exe
on Windows).
With Miniconda, you can create a specific environment for AnuGA, by running:
conda create -n anuga_env python=2.7 source activate anuga_env
With either Anaconda or Miniconda you can now install the dependencies by running:
conda install pip nose numpy scipy matplotlib netcdf4 conda install -c pingucarsti gdal
and setup GDAL_DATA environment variable:
export GDAL_DATA=`gdal-config --datadir`
(You should add this command to your .bashrc file.)
We have successfully install AnuGA on windows using Gohlke Binaries and using Miniconda. At present we recommend using the Gohlke Binaries.
Follow the instructions install ANUGA on Windows using the Gohlke Binaries
Alternatively if you want ot use Miniconda, follow the instructions install ANUGA on Windows using Miniconda
Unfortunately, the gcc
compiler MinGW included in Anaconda or
installable via Miniconda doesn't have OpenMP support. This is required to compile
some extension modules in AnuGA (those that have multi-threaded parallel code).
We suggest that you download and install the version of MinGW provided by TDM-GCC
after you've installed Anaconda and before you install AnuGA.
Don't forget to mark the openmp
and gfortran
options in the "Choose Components" part of
the installation. See this excellent documentation for Windows users
(they even have screenshots!). The same applies if you are using Miniconda.
After you've installed the dependencies you can proceed to install AnuGA
using pip.
Open a terminal (or cmd.exe
on Windows) and run:
pip install anuga
If you already have AnuGA installed and want to upgrade to a newer version, use:
pip install anuga --upgrade
To uninstall simply run:
pip uninstall anuga
Note
The Windows installer from older versions is no longer supported.
If you want the very latest code and features, you can install AnuGA directly from Github. We try to maintain the master branch stable and passing all tests, so it should be safe to use.
First, you'll need to install git. Then, open a terminal and run:
git clone git://github.com/GeoscienceAustralia/anuga_core.git
This will fetch the source code from Github
and place it in a folder called anuga_core
in the directory where you ran the
command.
Then, just cd
into the directory and run pip
:
cd anuga_core pip install --upgrade .
From the source directory run python runtests.py
python runtests.py
If you get an error message or weird result, please write to the mailing list. To make it easier for us to debug you problem, please include the following information:
- Operating system
- Python distribution (Anaconda, PythonXY, ETS/Canopy, own install)
- Python version (2.6, 2.7 etc)
- The script you ran (and gave you an error/weird result)
- The error message (the part that says
Traceback: ...
) or result (figure, numbers, etc)