Commit 1460f06198a221e86eff876c8d636d18dbdcefdf

Authored by Jürgen Knödlseder
1 parent 45ad9a3b

Add conda installation instructions

doc/source/admin/index.rst
... ... @@ -6,6 +6,7 @@ Getting ctools
6 6 .. toctree::
7 7 :maxdepth: 1
8 8  
  9 + install_source
  10 + install_conda
9 11 download
10   - install
11 12 release_history/index
... ...
doc/source/admin/install_conda.rst 0 → 100644
  1 +.. _sec_install_conda:
  2 +
  3 +Installing via conda
  4 +====================
  5 +
  6 +`Anaconda <https://www.anaconda.com/download/>`_ (you can also use
  7 +`Miniconda <https://conda.io/miniconda.html>`_ for a smaller footprint) is a
  8 +scientific Python installation shipping with essentially all needed packages.
  9 +Install it according to the instructions on their homepage. You can use any
  10 +Anaconda Python version. An Anaconda Python installation is completely separate
  11 +from any existing system wide or user space Python installation, so Anaconda
  12 +can be tested without the fear of breaking an existing installation.
  13 +
  14 +Anaconda works on most systems without root access!
  15 +
  16 +
  17 +Installing
  18 +----------
  19 +
  20 +- `Install Anaconda following the instructions on their site <https://www.anaconda.com/download/>`_
  21 +
  22 +- Add the ``conda-forge`` and ``cta-observatory`` channels to your Anaconda
  23 + configuration
  24 +
  25 + .. code-block:: bash
  26 +
  27 + $ conda config --append channels conda-forge
  28 + $ conda config --append channels cta-observatory
  29 +
  30 +- We strongly recommend to work with separate Anaconda environments, and
  31 + especially not use the special root environment (that is used for all conda
  32 + commands and environment manipulations, package installations etc.) for
  33 + anything besides updating the conda package itself (if necessary):
  34 +
  35 + .. code-block:: bash
  36 +
  37 + $ conda create -n myenv python=2.7 # or e.g. python=3.5
  38 + $ source activate myenv
  39 + (myenv) $
  40 +
  41 +- Install pre-compiled ctools conda package from Anaconda cloud with:
  42 +
  43 + .. code-block:: bash
  44 +
  45 + (myenv) $ conda install ctools
  46 +
  47 + This will also install the required dependencies, and in particular GammaLib
  48 + and cfitsio.
  49 +
  50 +- Re-activate your environment to initialise the ctools environment variables
  51 +
  52 + .. code-block:: bash
  53 +
  54 + (myenv) $ source activate myenv
  55 +
  56 +
  57 +Testing
  58 +-------
  59 +
  60 +Type the following to test the ctools and GammaLib packages
  61 +
  62 +.. code-block:: bash
  63 +
  64 + (myenv) $ python -c 'import ctools; ctools.test()'
  65 + (myenv) $ python -c 'import cscripts; cscripts.test()'
  66 + (myenv) $ python -c 'import gammalib; gammalib.test()'
  67 +
  68 +
  69 +Updating
  70 +--------
  71 +
  72 +Type the following to update the ctools package
  73 +
  74 +.. code-block:: bash
  75 +
  76 + (myenv) $ conda update ctools
  77 +
  78 +or (if you did not add the ``cta-observatory`` channel to your default
  79 +channels):
  80 +
  81 +.. code-block:: bash
  82 +
  83 + (myenv) $ conda update -c cta-observatory ctools
... ...
doc/source/admin/install.rst renamed to doc/source/admin/install_source.rst
1   -.. _sec_install:
  1 +.. _sec_compiling_source:
2 2  
3   -Installing ctools
4   -=================
  3 +Compiling from source
  4 +=====================
5 5  
6 6 Before you start
7 7 ----------------
... ... @@ -27,8 +27,6 @@ software:
27 27 No system administrator privileges are needed to install ctools.
28 28  
29 29  
30   -.. _sec_installing_gammalib:
31   -
32 30 Installing GammaLib
33 31 -------------------
34 32  
... ... @@ -97,8 +95,6 @@ which then installs GammaLib in the ``gamma`` folder of your home
97 95 directory.
98 96  
99 97  
100   -.. _sec_setup_gammalib:
101   -
102 98 Setting up the GammaLib environment
103 99 -----------------------------------
104 100  
... ... @@ -161,8 +157,6 @@ You can get the full list of configuration options by typing
161 157 $ ./configure --help
162 158  
163 159  
164   -.. _sec_testing_ctools:
165   -
166 160 Testing ctools
167 161 --------------
168 162  
... ... @@ -249,7 +243,6 @@ first the :ref:`issues` section. If you cannot fix the problem, please
249 243 create an issue on the ctools tracker
250 244 `here <https://cta-redmine.irap.omp.eu/projects/ctools>`_.
251 245  
252   -.. _sec_installing_ctools:
253 246  
254 247 Installing ctools
255 248 -----------------
... ... @@ -277,7 +270,6 @@ can be given, for example:
277 270  
278 271 $ ./configure --prefix=$HOME/gamma
279 272  
280   -.. _sec_setup_ctools:
281 273  
282 274 Setting up the ctools environment
283 275 ---------------------------------
... ... @@ -302,7 +294,6 @@ If you use C shell or a variant then add the following to your
302 294 setenv CTOOLS /usr/local/gamma
303 295 source $CTOOLS/bin/ctools-init.csh
304 296  
305   -.. _sec_check_ctools_setup:
306 297  
307 298 Checking your setup
308 299 -------------------
... ... @@ -330,8 +321,6 @@ detailed information about your setup. There&#39;s also a ``csinfo list``
330 321 command to quickly list the available tools.
331 322  
332 323  
333   -.. _sec_known_problems:
334   -
335 324 Known problems
336 325 --------------
337 326  
... ...