Ignore:
Timestamp:
Oct 4, 2016, 4:13:00 PM (9 years ago)
Author:
steve
Message:

Commit svn after a lot of git updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/INSTALL.rst

    r9734 r9737  
    11
    22
    3 Installation
     3******************
     4Anuga Installation
     5******************
     6
     7.. contents::
     8
     9
     10Introduction
    411============
    5 
    6 .. contents::
    7 
    8 Introduction
    9 ------------
    1012
    1113AnuGA_ is a python package with some C extensions (and an optional fortran
     
    1315We recommend python 2.7. 
    1416
    15 If you have a python 2.7 environment with gcc and gfortran support,
    16 then you can use pip to install the latest release
    17 version of AnuGA::
    18 
    19         pip install anuga
    20 
    21 You might want to install the dependencies via ubuntu ``apt-get`` or ``conda install``
    22 to download pre-compiled versions of the dependencies. See below.
    23 
    2417
    2518Dependencies
    26 ------------
     19============
    2720
    2821AnuGA requires the following packages:
     
    3730
    3831
    39 Ubuntu Install
    40 ++++++++++++++
     32Installing the latest DEVELOPMENT version on Ubuntu
     33===================================================
    4134
    4235AnuGA is developed on Ubuntu. The preferred way to install the dependencies is
    4336to use the standard ubuntu ``apt-get`` method.
    4437
    45 We have a script in the ``tools`` directory,
    46 `install_ubuntu.sh <https://github.com/GeoscienceAustralia/anuga_core/blob/master/tools/install_ubuntu.sh>`_
    47 which when run from the ``anuga_core`` directory will install AnuGA and all the dependencies using ``apt-get``.
    48 
    49 For extended instructions checkout the wiki page
    50 `install ANUGA on Ubuntu <https://github.com/GeoscienceAustralia/anuga_core/wiki/Install-ANUGA-on-Ubuntu>`_
    51 
    52 
    53 
    54 Alternative Ubuntu Install
    55 ++++++++++++++++++++++++++
    56 
    57 An alternative is to install the dependencies using the Anaconda_ or the Miniconda_ Python
    58 distributions by `Continuum Analytics`_.
    59 
    60 Miniconda_ has the advantage of allowing you to create multiple
    61 python environments and is particularly
    62 useful if you want to keep multiple versions of AnuGA.
    63 
    64 Both Anaconda_ and Miniconda_ do not require administrative rights
    65 to your computer and do not interfere with the Python installed
    66 in your system.
    67 
    68 
    69 Anaconda and Miniconda
    70 ~~~~~~~~~~~~~~~~~~~~~~
    71 
    72 Once you have downloaded and installed Anaconda_ or Miniconda_
    73 open a terminal (or ``cmd.exe`` on Windows).
    74 
    75 With  Miniconda_, you can create
    76 a specific environment for AnuGA, by running::
    77 
    78     conda create -n anuga_env python=2.7
    79     source activate anuga_env
    80    
    81    
    82 With either Anaconda_ or Miniconda_ you can now install the dependencies by running::
    83 
    84     conda install pip nose numpy scipy matplotlib netcdf4
    85     conda install -c pingucarsti gdal
    86    
    87 and setup GDAL_DATA environment variable:
    88 
    89     export GDAL_DATA=`gdal-config --datadir`
    90    
    91 (You should add this command to your .bashrc file.)   
    92 
    93 
    94 Windows Dependency Installation
    95 +++++++++++++++++++++++++++++++
    96 
    97 We have successfully install AnuGA on windows using Gohlke Binaries and using Miniconda.
    98 At present we recommend using the Gohlke Binaries.
    99 
    100 Follow the instructions
    101 `install ANUGA on Windows using the Gohlke Binaries
    102 <https://github.com/GeoscienceAustralia/anuga_core/wiki/Install-ANUGA-on-Windows-using-Gohlke-Binaries>`_
    103 
    104 Alternatively if you want ot use Miniconda, follow the instructions
    105 `install ANUGA on Windows using Miniconda
    106 <https://github.com/GeoscienceAustralia/anuga_core/wiki/Install-ANUGA-on-Windows-using-Miniconda>`_
    107 
    108 
    109 
    110 GCC dependency for Windows users
    111 ++++++++++++++++++++++++++++++++++++
    112 
    113 Unfortunately, the ``gcc`` compiler MinGW_ included in Anaconda or
    114 installable via Miniconda_ doesn't have OpenMP_ support. This is required to compile
    115 some extension modules in AnuGA (those that have multi-threaded parallel code).
    116 
    117 We suggest that you download and install the version of MinGW_ provided by TDM-GCC_
    118 **after** you've installed Anaconda and **before** you install AnuGA.
    119 Don't forget to mark the ``openmp`` and ``gfortran`` options in the "Choose Components" part of
    120 the installation. See this `excellent documentation for Windows users`_
    121 (they even have screenshots!). The same applies if you are using Miniconda_.
    122 
    123 
    124 Installing AnuGA
    125 ----------------
    126 
    127 After you've installed the dependencies you can proceed to install AnuGA
    128 using pip_.
    129 Open a terminal (or ``cmd.exe`` on Windows) and run::
    130 
    131     pip install anuga
    132 
    133 
    134 If you already have AnuGA installed and want to **upgrade** to a newer
    135 version, use::
    136 
    137     pip install anuga --upgrade
    138 
    139 To uninstall simply run::
    140 
    141     pip uninstall anuga
    142 
    143 
    144 .. note::
    145 
    146     The Windows installer from older versions is no longer supported.
    147 
    148 Installing the latest development version
    149 -----------------------------------------
    150 
    151 If you want the very latest code and features,
    152 you can install AnuGA directly from Github_.
     38We suggest installing the latest version of ANUGA_ from Github_.
    15339We try to maintain the *master* branch stable and
    154 `passing all tests <https://travis-ci.org/GeoscienceAustralia/anuga_core/branches>`__,
     40`passing all tests <https://travis-ci.org/GeoscienceAustralia/anuga_core/branches>`_,
    15541so it should be safe to use.
    15642
     
    16349and place it in a folder called ``anuga_core`` in the directory where you ran the
    16450command.
    165 Then, just ``cd`` into the directory and run ``pip``::
    166 
    167     cd anuga_core
    168     pip install --upgrade .
    169    
     51
     52We have a script in the ``anuga_core/tools`` directory,
     53`install_ubuntu.sh <https://github.com/GeoscienceAustralia/anuga_core/blob/master/tools/install_ubuntu.sh>`_
     54which when run from the ``anuga_core`` directory will install AnuGA and all the dependencies using ``apt-get``
     55and ``pip`` to install the dependencies.
     56
     57Parallel Support
     58----------------
     59
     60At this stage you can decide whether you want Parallel support or not.
     61We support two versions of MPI, ``mpich`` and ``openmpi``
     62
     63Just during the setup stage, you should create an environment variable  ``ANUGA_PARALLEL`` via::
     64
     65    export ANUGA_PARALLEL=openmpi
     66
     67or::
     68
     69    export ANUGA_PARALLEL=mpich
     70
     71
     72then the install script will load the  ``openmpi`` or ``mpich`` libraries and binaries respectively.
     73
     74
     75If you don't want parallel support set the variable to something else, e.g::
     76
     77    export ANUGA_PARALLEL=false
     78
     79
     80Running the installation script
     81-------------------------------
     82
     83Change into the newly downloaded ``anuga_core`` directory and run the installation script
     84(this will take 5 to 10 minutes depending on your network connection)::
     85
     86        cd anuga_core
     87        bash tools/install_ubuntu.sh
     88
     89
     90Some of the commands in this script use sudo, so you will have to provide
     91a password to install into the system wide directories.
     92
     93If all has been successful then anuga should be installed.
    17094
    17195Testing the install
    17296-------------------
    17397
    174 
    175 From the source directory run ``python runtests.py``
     98To test the installation, from the ``anuga_core`` directory run ``python runtests.py``::
    17699
    177100    python runtests.py
    178101   
    179 
    180 If you get an error message or weird result,
    181 please write to the `mailing list`_.
     102If there are no errors then you have successfully installed aunga.
     103
     104Errors with runtests
     105--------------------
     106
     107If you get an error message or a weird result when running ``runtests.py``,
     108please write to the `mailing list`_ or `create an issue on the github site
     109<https://github.com/GeoscienceAustralia/anuga_core/issues>`__.
     110
    182111To make it easier for us to debug you problem, please include the following
    183112information:
     
    189118* The error message (the part that says ``Traceback: ...``) or result (figure,
    190119  numbers, etc)
    191    
    192 .. _AnuGA http://anuga.anu.edu.au/
     120
     121
     122
     123
     124For extended instructions on installing on Ubuntu checkout the wiki page
     125`install ANUGA on Ubuntu <https://github.com/GeoscienceAustralia/anuga_core/wiki/Install-ANUGA-on-Ubuntu>`_
     126
     127
     128
     129Alternative Ubuntu Install
     130==========================
     131
     132An alternative is to install the dependencies using the Anaconda_ or the Miniconda_ Python
     133distributions by `Continuum Analytics`_.
     134
     135Miniconda_ has the advantage of allowing you to create multiple
     136python environments and is particularly
     137useful if you want to keep multiple versions of AnuGA.
     138
     139Both Anaconda_ and Miniconda_ do not require administrative rights
     140to your computer and do not interfere with the Python installed
     141in your system.
     142
     143
     144Anaconda and Miniconda
     145----------------------
     146
     147Once you have downloaded and installed Anaconda_ or Miniconda_
     148open a terminal (or ``cmd.exe`` on Windows).
     149
     150With  Miniconda_, you can create
     151a specific environment for AnuGA, by running::
     152
     153    conda create -n anuga_env python=2.7
     154    source activate anuga_env
     155   
     156   
     157With either Anaconda_ or Miniconda_ you can now install the dependencies by running::
     158
     159    conda install pip nose numpy scipy matplotlib netcdf4
     160    conda install -c pingucarsti gdal
     161   
     162and setup GDAL_DATA environment variable::
     163
     164    export GDAL_DATA=`gdal-config --datadir`
     165   
     166(You should add this command to your .bashrc file.)   
     167
     168
     169Windows Dependency Installation
     170===============================
     171
     172We have successfully install AnuGA on windows using Gohlke Binaries and using Miniconda.
     173At present we recommend using the Gohlke Binaries.
     174
     175Follow the instructions
     176`install ANUGA on Windows using the Gohlke Binaries
     177<https://github.com/GeoscienceAustralia/anuga_core/wiki/Install-ANUGA-on-Windows-using-Gohlke-Binaries>`_
     178
     179Alternatively if you want ot use Miniconda, follow the instructions
     180`install ANUGA on Windows using Miniconda
     181<https://github.com/GeoscienceAustralia/anuga_core/wiki/Install-ANUGA-on-Windows-using-Miniconda>`_
     182
     183
     184
     185
     186GCC dependency for Windows users
     187--------------------------------
     188
     189Unfortunately, the ``gcc`` compiler MinGW_ included in Anaconda or
     190installable via Miniconda_ doesn't have OpenMP_ support. This is required to compile
     191some extension modules in AnuGA (those that have multi-threaded parallel code).
     192
     193We suggest that you download and install the version of MinGW_ provided by TDM-GCC_
     194**after** you've installed Anaconda and **before** you install AnuGA.
     195Don't forget to mark the ``openmp`` and ``gfortran`` options in the "Choose Components" part of
     196the installation. See this `excellent documentation for Windows users`_
     197(they even have screenshots!). The same applies if you are using Miniconda_.
     198
     199
     200Installing the latest development version of AnuGA om Windows
     201=============================================================
     202
     203We suggest instaling the latest code and features,
     204by installing AnuGA directly from Github_.
     205We try to maintain the *master* branch stable and
     206`passing all tests <https://travis-ci.org/GeoscienceAustralia/anuga_core/branches>`__,
     207so it should be safe to use.
     208
     209First, you'll need to `install git`_.
     210Then, open a terminal and run::
     211
     212    git clone git://github.com/GeoscienceAustralia/anuga_core.git
     213
     214This will fetch the source code from Github_
     215and place it in a folder called ``anuga_core`` in the directory where you ran the
     216command.
     217Then, just ``cd`` into the directory and run ``pip``::
     218
     219    cd anuga_core
     220    pip install --upgrade .
     221   
     222
     223Testing the install
     224-------------------
     225
     226
     227From the source directory run ``python runtests.py``::
     228
     229    python runtests.py
     230   
     231
     232If you get an error message or weird result,
     233please write to the `mailing list`_ or `create an issue on the github site
     234<https://github.com/GeoscienceAustralia/anuga_core/issues>`__.
     235
     236To make it easier for us to debug you problem, please include the following
     237information:
     238
     239* Operating system
     240* Python distribution (Anaconda_, PythonXY_, `ETS/Canopy`_, own install)
     241* Python version (2.6, 2.7 etc)
     242* The script you ran (and gave you an error/weird result)
     243* The error message (the part that says ``Traceback: ...``) or result (figure,
     244  numbers, etc)
     245   
     246Using pip_ to install anuga
     247===========================
     248   
     249You can alternatively use  pip_ to install the lateest released version of `anuga`
     250
     251Open a terminal (or ``cmd.exe`` on Windows) and run::
     252
     253    pip install anuga
     254
     255
     256If you already have AnuGA installed and want to **upgrade** to a newer
     257released version, use::
     258
     259    pip install anuga --upgrade
     260
     261To uninstall simply run::
     262
     263    pip uninstall anuga
     264
     265
     266
     267.. note::
     268
     269    The Windows installer from older versions is no longer supported.
     270   
     271   
     272.. _AnuGA: http://anuga.anu.edu.au/
    193273.. _install git: http://git-scm.com/
    194274.. _Github: https://github.com/stoiver/anuga_core/
     
    205285.. _TDM-GCC: http://tdm-gcc.tdragon.net/
    206286.. _excellent documentation for Windows users: http://docs-windows.readthedocs.org/en/latest/devel.html#mingw-with-openmp-support
    207 
Note: See TracChangeset for help on using the changeset viewer.