.. _installation:

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


Using Anaconda or Miniconda (recommended)
-----------------------------------------

Using conda_ (latest version recommended), pyrsr is installed as follows:


1. Create virtual environment for pyrsr (optional but recommended):

   .. code-block:: bash

    $ conda create -c conda-forge --name pyrsr python=3
    $ conda activate pyrsr


2. Then install pyrsr itself:

   .. code-block:: bash

    $ conda install -c conda-forge pyrsr


This is the preferred method to install pyrsr, as it always installs the most recent stable release and
automatically resolves all the dependencies.


Using pip (not recommended)
---------------------------

There is also a `pip`_ installer for pyrsr. However, please note that pyrsr depends on some
open source packages that may cause problems when installed with pip. Therefore, we strongly recommend
to resolve the following dependencies before the pip installer is run:

    * matplotlib
    * numpy
    * pandas


Then, the pip installer can be run by:

   .. code-block:: bash

    $ pip install pyrsr

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



.. note::

    pyrsr has been tested with Python 3.6+., i.e., should be fully compatible to all Python versions from 3.6 onwards.


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