Changes between Initial Version and Version 1 of InstallWindowsGohlke


Ignore:
Timestamp:
Mar 31, 2015, 5:10:06 PM (10 years ago)
Author:
steve
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallWindowsGohlke

    v1 v1  
     1= Installing current development version of ANUGA research code on Windows using Gohlke Binaries =
     2
     3== Introduction ==
     4
     5{{{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.
     6
     7
     8== Python ==
     9
     10We 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].
     11 
     12
     13== Python ==
     14
     15Download and run the [https://www.python.org/ftp/python/2.7.9/python-2.7.9.msi Python 2.7] installer.
     16
     17Be sure to choose the win32 {{{python 2.7}}} version. This is the version for which we are developing.
     18
     19At the moment {{{anuga}}} has memory problems with {{{win64}}} so avoid that for the time being.
     20You are most welcome to help track down the problems and provide a bug fix :-).
     21
     22== Anuga python package dependencies ==
     23
     24We need to download a number of pre-compiled python packages.
     25
     26Download the following whl files:
     27
     28From http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy download numpy‑1.9.2+mkl‑cp27‑none‑win32.whl
     29
     30From http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy download scipy‑0.15.1‑cp27‑none‑win32.whl
     31
     32From http://www.lfd.uci.edu/~gohlke/pythonlibs/#netcdf4 download netCDF4‑1.1.7‑cp27‑none‑win32.whl
     33
     34From http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib download matplotlib‑1.4.3‑cp27‑none‑win32.whl
     35
     36From http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal download GDAL‑1.11.2‑cp27‑none‑win32.whl
     37
     38From http://www.lfd.uci.edu/~gohlke/pythonlibs/#nose download nose‑1.3.4‑py2‑none‑any.whl
     39
     40== GCC compiler ==
     41
     42We need a gcc compiler with openmp support to install {{{anuga}}}.
     43
     44We suggest that you download and install the version of MinGW provided by [http://tdm-gcc.tdragon.net/ TDM-GCC].
     45Mark the ``openmp`` and ``gfortran`` options in the "Choose Components" part of the installation.
     46
     47We 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
     48
     49{{{
     50[build]
     51compiler=mingw32
     52}}}
     53
     54
     55== Git ==
     56
     57Our preferred method of installing {{{anuga}}} and updating is to use {{{git}}} (Though you can use subverson or download a zipped file).
     58
     59To install git use the [http://git-scm.com/download/win windows download link]
     60
     61== Manually install dependencies ==
     62
     63It is possible to install the required environment manually. You would need to install {{{Mingw}}} to provide a compiler, the standard distribution of {{{python27}}} and then precompiled python libraries for {{{numpy, scipy, matplotlib, netcdf4}}} from a site like [http://www.lfd.uci.edu/~gohlke/pythonlibs/]. It would be interesting to hear feedback on this option, as there is an opportunity to use versions using the Intel Math Kernel Library, which should provide a useful increase in speed.
     64
     65
     66== Download ANUGA ==
     67
     68You should now have all the dependencies installed. You should fire up a new {{{cmd.exe}}} and install {{{anuga}}}
     69
     70You can just install the {{{anuga}}} library using {{{pip}}} or download the full repo with example code and manual using {{{git}}}.
     71
     72=== pip install ===
     73
     74If just want the latest released version of the package then use {{{pip}}} via
     75
     76{{{
     77pip install anuga
     78}}}
     79
     80If the install is successful, test the instal via
     81
     82{{{
     83python -c "import anuga; anuga.test()"
     84}}}
     85
     86
     87=== Install via source ===
     88
     89First we need to get the anuga source code.
     90
     91=== Clone anuga via git ===
     92
     93
     94To obtain the anuga repo from  github use {{{git clone}}} i.e.
     95
     96{{{
     97git clone https://github.com/GeoscienceAustralia/anuga_core.git
     98}}}
     99
     100=== Checkout anuga via svn  ===
     101
     102You can also check out the anuga repository using subversion.
     103I suggest installing [http://tortoisesvn.net/downloads.html tortoise svn downloads] and then checking out the following svn repository.
     104When you installed {{{tortoise svn}}} it creates a few extra menu items to your right click menu in the file manager. Just choose "tortoise" checkout to download the code.
     105
     106{{{
     107https://anuga.anu.edu.au/svn/anuga/trunk/anuga_core
     108}}}
     109
     110
     111
     112
     113=== Zipped version ===
     114
     115Finally a zipped version of the latest development version of {{{anuga}}} is available from github at [https://github.com/GeoscienceAustralia/anuga_core/archive/master.zip] and the latest released version at sourceforge [http://sourceforge.net/projects/anuga/files/anuga_1.3/anuga_1.3.10.zip] You will need to unzip the file into a directory called {{{anuga_core}}} perhaps in your home directory.
     116
     117
     118
     119
     120== Installing ANUGA ==
     121
     122You should now have an anuga_core directory.
     123
     124Now go to the directory anuga_core and build and install anuga.
     125Fire up a cmd terminal, change to the {{{anuga_core}}} directory and run
     126
     127{{{
     128python setup.py install
     129}}}
     130
     131Hopefully no errors.
     132
     133== Run Unit tests ==
     134
     135From the anuga_core directory run the unit tests via:
     136
     137{{{
     138python runtests.py
     139}}}
     140
     141
     142=== Note ===
     143At present the Anaconda (conda) version of {{{gdal}}} is missing the {{{gdal}}} data directory (presumably to save space). This will cause some error messages of the form "ERROR 4: Unable to open EPSG support file gcs.csv". It should be fine to disregard these errors messages. It would be possible to download the gdal data directory and point the {{{GDAL_DATA}}} environment variable to the data directory.
     144
     145
     146== Conclusion ==
     147
     148Hopefully 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 demos in the directory anuga_core/documentation/user_manual/demos (along with the user manual) to see how to use anuga.
     149
     150== Updating ==
     151
     152From 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).
     153
     154I.e. if using {{{git}}} fire up {{{cmd.exe}}}, change into the {{{anuga_core}}} directory and run
     155
     156{{{
     157git pull
     158}}}
     159
     160
     161Then  re-install the latest version of the code and check the unit tests via
     162
     163{{{
     164python setup.py install
     165python runtests.py
     166}}}