Installation#

species is compatible with Python versions 3.9/3.10/3.11 and is available in the PyPI repository and on Github.

It is recommended to install species within a virtual environment such that the required dependency versions will not cause any conflicts with other installed packages.

Installation from PyPI#

The species toolkit can be installed with the pip package manager, but first Cython should be separately installed:

$ pip install cython
$ pip install species

Or, to update species to the most recent version:

$ pip install --upgrade species

It is also required to separately install petitRADTRANS, although this step can be skipped:

$ pip install petitRADTRANS

The installation of petitRADTRANS can be somewhat challenging on some machines. When skipping the installation of petitRADTRANS it is still possible to use most of the functionalities of species.

Important

The PyMultiNest package requires the manual installation of MultiNest. Please follow the instructions for the building the library and make sure that the LD_LIBRARY_PATH (on Linux) or DYLD_LIBRARY_PATH (on macOS) environment variable is set. It is also possible to use species without installing MultiNest (but a warning will appear), apart from the functionalities that rely on PyMultiNest.

Installation from Github#

Using pip#

The repository on Github contains the latest implementations and can also be installed with pip:

$ pip install git+https://github.com/tomasstolker/species.git

Cloning the repository#

In case you want to look into the code, it is best to clone the repository:

$ git clone https://github.com/tomasstolker/species.git

Next, the package is installed by running pip in the local repository folder:

$ pip install -e .

New commits can be pulled from Github once a local copy of the repository exists:

$ git pull origin main

Do you want to make changes to the code? Please fork the species repository on the Github page and clone your own fork instead of the main repository. Contributions and pull requests are welcome (see Contributing section).

Testing species#

The installation can now be tested, for example by starting Python in interactive mode and initializing a workflow in the current working folder:

>>> from species import SpeciesInit
>>> SpeciesInit()