Skip to content

Commit

Permalink
Merge pull request #708 from wkerzendorf/installation_update
Browse files Browse the repository at this point in the history
Add new installation instructions
  • Loading branch information
wkerzendorf authored Feb 10, 2017
2 parents 7baf69d + 2ec183a commit 7d8b1ea
Showing 1 changed file with 6 additions and 93 deletions.
99 changes: 6 additions & 93 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Installation
************

Before installing TARDIS, please check its :ref:`requirements
<requirements_label>`. We provide instructions for multiple ways of installing
TARDIS here, but we strongly recommend to follow the Anaconda :ref:`guide
<requirements_label>`. We provide instructions for installing TARDIS using
Anaconda :ref:`guide
<anaconda_inst_label>`. If you encounter problems, consult the
:ref:`troubleshooting <troubleshooting_inst_label>` section. Once you have
installed TARDIS, check out :doc:`running` for instructions of how to perform
Expand All @@ -20,19 +20,15 @@ Requirements
.. warning::
TARDIS only works on 64-bit python installations.

The requirements for running TARDIS are easy to install using package managers like
OS X's macports or Linux package managers or using the Anaconda python
distribution.

You can see a list of all the requirements of TARDIS in the `environment definition file <https://raw.githubusercontent.com/tardis-sn/tardis/master/tardis_env27.yml>`_.

TARDIS is using astropy's excellent installation helpers and thus uses similar
instructions to astropy.

.. _anaconda_inst_label:

Installing TARDIS with Anaconda (recommended)
=============================================
Installing TARDIS with Anaconda
===============================

We highly recommend using the Anaconda python environment to install TARDIS (or
any other scientific packages for that matter). Anaconda has the advantage of
Expand Down Expand Up @@ -63,99 +59,16 @@ and after you are done with TARDIS you can deactivate::
One does not need to recreate the environment, but simply activate it every time
TARDIS is used.

To install the latest stable version of TARDIS simply do::

pip install tardis-sn

or to use the development version::

pip install git+https://github.com/tardis-sn/tardis

Installing TARDIS with virtualenv
==================================


A virtual environment is python's way to ensure that the versions of third-party libraries
that TARDIS requires do not interfere with the system-wide installation. This
is also the way that the majority of core developers for TARDIS operate.

It is nevertheless recommended to install a number of python packages using the
system packagemanager. This ensures that third-party non-python libraries like
`libhdf5`, `lapack`, etc. are installed.

For OS X we recommend the `macports <http://www.macports.org/install.php>`_ package
manager::

sudo port install python27 py27-scipy py27-numpy py27-virtualenv py27-astropy py27-h5py py27-yaml py27-pandas py27-pip py27-tables

In Ubuntu 14.04 the pre-requesite install works with this::

sudo apt-get install python-virtualenv python-numpy python-pandas python-scipy python-h5py python-yaml ipython python-matplotlib cython git

First use the following guide to install virtualenv and the TARDIS requirements
:doc:`workflow/python_environment`.

After the virtualenv and the requirements are installed, there are a few options
of how to proceed.

If one just wants to use TARDIS you can install the latest stable version::

pip install tardis-sn

the latest development version can be installed using::
Since TARDIS has reached a mature state, we recommend always installing the latest development version::

pip install git+https://github.com/tardis-sn/tardis

If you are interested in doing some development for TARDIS please read
:doc:`workflow/development_workflow`.


Once you are done you can run the simple example listed in :doc:`running`.



Installing TARDIS system-wide (not recommended)
===============================================

On Ubuntu (14.04)
-----------------

We use a clean install of Ubuntu 14.04 as one of our testing grounds. Here's how we get TARDIS to run::

sudo apt-get install python-dev python-pip python-numpy python-scipy python-h5py python-pandas python-yaml

We now need to install the newest astropy and we will install everything into our users directory::

pip install astropy --user
Once astropy is installed, install TARDIS::
To install the latest stable version of TARDIS simply do (usually outdated)::

pip install tardis-sn

.. note::
pip often tries to take care of many of the dependencies, this might be annoying as they already exist.
Adding `--no-deps` will help with this problem.


On MAC OS X (10.8.5)
--------------------

On a clean install of Mountain Lion, here's how we get TARDIS running::

First install `macports <http://www.macports.org/install.php>`_

Use macports to install::

sudo port install python27 py27-astropy py27-h5py py27-yaml py27-pandas py27-pip

Then install TARDIS::

pip-2.7 install tardis-sn --user --pre

Before running, ensure that the directory ~/Library/Python/2.7/bin is in the appropriate path.

.. note::
This has also been successfully tested on a clean MAC OS 10.9.1 (Mavericks) install.


.. _troubleshooting_inst_label:
Expand Down

0 comments on commit 7d8b1ea

Please sign in to comment.