.. highlight:: shell

============
Installation
============


Stable release
--------------

To install carbatpy, run this command in your terminal:

.. code-block:: console

    $ pip install carbatpy

This is the preferred method to install carbatpy, as it will always install the most recent stable release.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.

.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/


From sources
------------

The sources for carbatpy can be downloaded from the `Gitlab repo`_.

You can either clone the public repository:

.. code-block:: console

    $ git clone https://git.uni-due.de/spp-2403/td-ude/carbatpy.git


Once you have a copy of the source, you can install it with:

.. code-block:: console

    $ python setup.py install
    
Environment Variables
---------------------

There are two environment variables, which you may want to set:
*CARBATPY_BASE_DIR* and *CARBATPY_RES_DIR*. You can set them to directories in
your system, where the carbatpy directory with the code is to be found and where the results
are stored as default.



.. _Gitlab repo: https://git.uni-due.de/spp-2403/td-ude/carbatpy

