Changeset 9737 for trunk/anuga_core/INSTALL.rst
- Timestamp:
- Oct 4, 2016, 4:13:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/INSTALL.rst
r9734 r9737 1 1 2 2 3 Installation 3 ****************** 4 Anuga Installation 5 ****************** 6 7 .. contents:: 8 9 10 Introduction 4 11 ============ 5 6 .. contents::7 8 Introduction9 ------------10 12 11 13 AnuGA_ is a python package with some C extensions (and an optional fortran … … 13 15 We recommend python 2.7. 14 16 15 If you have a python 2.7 environment with gcc and gfortran support,16 then you can use pip to install the latest release17 version of AnuGA::18 19 pip install anuga20 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 24 17 25 18 Dependencies 26 ------------ 19 ============ 27 20 28 21 AnuGA requires the following packages: … … 37 30 38 31 39 Ubuntu Install 40 ++++++++++++++ 32 Installing the latest DEVELOPMENT version on Ubuntu 33 =================================================== 41 34 42 35 AnuGA is developed on Ubuntu. The preferred way to install the dependencies is 43 36 to use the standard ubuntu ``apt-get`` method. 44 37 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_. 38 We suggest installing the latest version of ANUGA_ from Github_. 153 39 We 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>`_, 155 41 so it should be safe to use. 156 42 … … 163 49 and place it in a folder called ``anuga_core`` in the directory where you ran the 164 50 command. 165 Then, just ``cd`` into the directory and run ``pip``:: 166 167 cd anuga_core 168 pip install --upgrade . 169 51 52 We 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>`_ 54 which when run from the ``anuga_core`` directory will install AnuGA and all the dependencies using ``apt-get`` 55 and ``pip`` to install the dependencies. 56 57 Parallel Support 58 ---------------- 59 60 At this stage you can decide whether you want Parallel support or not. 61 We support two versions of MPI, ``mpich`` and ``openmpi`` 62 63 Just during the setup stage, you should create an environment variable ``ANUGA_PARALLEL`` via:: 64 65 export ANUGA_PARALLEL=openmpi 66 67 or:: 68 69 export ANUGA_PARALLEL=mpich 70 71 72 then the install script will load the ``openmpi`` or ``mpich`` libraries and binaries respectively. 73 74 75 If you don't want parallel support set the variable to something else, e.g:: 76 77 export ANUGA_PARALLEL=false 78 79 80 Running the installation script 81 ------------------------------- 82 83 Change 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 90 Some of the commands in this script use sudo, so you will have to provide 91 a password to install into the system wide directories. 92 93 If all has been successful then anuga should be installed. 170 94 171 95 Testing the install 172 96 ------------------- 173 97 174 175 From the source directory run ``python runtests.py`` 98 To test the installation, from the ``anuga_core`` directory run ``python runtests.py``:: 176 99 177 100 python runtests.py 178 101 179 180 If you get an error message or weird result, 181 please write to the `mailing list`_. 102 If there are no errors then you have successfully installed aunga. 103 104 Errors with runtests 105 -------------------- 106 107 If you get an error message or a weird result when running ``runtests.py``, 108 please write to the `mailing list`_ or `create an issue on the github site 109 <https://github.com/GeoscienceAustralia/anuga_core/issues>`__. 110 182 111 To make it easier for us to debug you problem, please include the following 183 112 information: … … 189 118 * The error message (the part that says ``Traceback: ...``) or result (figure, 190 119 numbers, etc) 191 192 .. _AnuGA http://anuga.anu.edu.au/ 120 121 122 123 124 For 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 129 Alternative Ubuntu Install 130 ========================== 131 132 An alternative is to install the dependencies using the Anaconda_ or the Miniconda_ Python 133 distributions by `Continuum Analytics`_. 134 135 Miniconda_ has the advantage of allowing you to create multiple 136 python environments and is particularly 137 useful if you want to keep multiple versions of AnuGA. 138 139 Both Anaconda_ and Miniconda_ do not require administrative rights 140 to your computer and do not interfere with the Python installed 141 in your system. 142 143 144 Anaconda and Miniconda 145 ---------------------- 146 147 Once you have downloaded and installed Anaconda_ or Miniconda_ 148 open a terminal (or ``cmd.exe`` on Windows). 149 150 With Miniconda_, you can create 151 a specific environment for AnuGA, by running:: 152 153 conda create -n anuga_env python=2.7 154 source activate anuga_env 155 156 157 With 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 162 and 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 169 Windows Dependency Installation 170 =============================== 171 172 We have successfully install AnuGA on windows using Gohlke Binaries and using Miniconda. 173 At present we recommend using the Gohlke Binaries. 174 175 Follow 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 179 Alternatively 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 186 GCC dependency for Windows users 187 -------------------------------- 188 189 Unfortunately, the ``gcc`` compiler MinGW_ included in Anaconda or 190 installable via Miniconda_ doesn't have OpenMP_ support. This is required to compile 191 some extension modules in AnuGA (those that have multi-threaded parallel code). 192 193 We 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. 195 Don't forget to mark the ``openmp`` and ``gfortran`` options in the "Choose Components" part of 196 the installation. See this `excellent documentation for Windows users`_ 197 (they even have screenshots!). The same applies if you are using Miniconda_. 198 199 200 Installing the latest development version of AnuGA om Windows 201 ============================================================= 202 203 We suggest instaling the latest code and features, 204 by installing AnuGA directly from Github_. 205 We try to maintain the *master* branch stable and 206 `passing all tests <https://travis-ci.org/GeoscienceAustralia/anuga_core/branches>`__, 207 so it should be safe to use. 208 209 First, you'll need to `install git`_. 210 Then, open a terminal and run:: 211 212 git clone git://github.com/GeoscienceAustralia/anuga_core.git 213 214 This will fetch the source code from Github_ 215 and place it in a folder called ``anuga_core`` in the directory where you ran the 216 command. 217 Then, just ``cd`` into the directory and run ``pip``:: 218 219 cd anuga_core 220 pip install --upgrade . 221 222 223 Testing the install 224 ------------------- 225 226 227 From the source directory run ``python runtests.py``:: 228 229 python runtests.py 230 231 232 If you get an error message or weird result, 233 please write to the `mailing list`_ or `create an issue on the github site 234 <https://github.com/GeoscienceAustralia/anuga_core/issues>`__. 235 236 To make it easier for us to debug you problem, please include the following 237 information: 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 246 Using pip_ to install anuga 247 =========================== 248 249 You can alternatively use pip_ to install the lateest released version of `anuga` 250 251 Open a terminal (or ``cmd.exe`` on Windows) and run:: 252 253 pip install anuga 254 255 256 If you already have AnuGA installed and want to **upgrade** to a newer 257 released version, use:: 258 259 pip install anuga --upgrade 260 261 To 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/ 193 273 .. _install git: http://git-scm.com/ 194 274 .. _Github: https://github.com/stoiver/anuga_core/ … … 205 285 .. _TDM-GCC: http://tdm-gcc.tdragon.net/ 206 286 .. _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.