.. _basic-installation:

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

The installation of MARLlib has two parts: common installation and external environment installation.
We've tested the installation on Python 3.8 with Ubuntu 18.04 and Ubuntu 20.04.


MARLlib Installation
--------------------

We strongly recommend using `conda <https://docs.conda.io/en/latest/miniconda.html>`_ to manage your dependencies and avoid version conflicts.
Here we show the example of building python 3.8 based conda environment.

.. code-block:: shell

    conda create -n marllib python==3.8
    conda activate marllib
    # please install pytorch <= 1.9.1 compatible with your hardware.

    pip install ray==1.8.0
    pip install ray[tune]
    pip install ray[rllib]

    git clone https://github.com/ICLR2023Paper4242/MARLlib.git
    cd MARLlib
    pip install -e .


External Environments Requirements
------------------------------------------

External environments are not auto-integrated. However, you can install them by following.

* `our simplified guides <https://iclr2023marllib.readthedocs.io/en/latest/handbook/env.html>`_.
* the official guide of each environment.


Contribute
----------------------------

Please refer to the `Contribute <https://github.com/ICLR2023Paper4242/MARLlib>`_ in our repository cover.

