Installation Instructions
We recommend using the Stable Release versions if you are just looking to use the package directly. If you are seeking to develop the package further then follow the Development Environment instructions for installation.
Python: 3.10–3.12 recommended
Stable Release v3.0.0
The Stable Release version is recommended for users who want to use CARES Reinforcement Learning as a package without modifying the core codebase. It provides a tested, reliable version suitable for running experiments and applications.
1. Clone the latest Release (stable)
Clone the latest stable release of CARES Reinforcement Learning.
Unstable Main Branch
Clone the main branch for the latest features - note this branch may not be stable as it is the working branch.
2. Install the Package
Install the package and it's dependencies through pip.
Editable Install
This installs the package in editable mode (-e), allowing local changes to the code to be reflected without reinstalling.
Optional dependencies
The [gym] extra installs common environment dependencies.
Additional environment packages (e.g. robotics, vision, or MARL environments) may require installing extra dependencies separately.
Development Environment (UV/pyenv)
We recommend using pyenv to manage Python versions and uv to manage dependencies and work with reproducible environments from papers. This is because we have various other gym packages that can be installed and used and the general pyenv environment is useful to manage them together. This setup should be used by those looking to contribute to the code base or various gym packages.
1. Install uv and pyenv
Install uv using the official installer:
Reproducible environments
Using uv ensures that dependency versions match those used in experiments
and published results.
This is recommended when reproducing research or running benchmark comparisons.
Install 'pyenv' using the official installer:
pyenv setup
After installing pyenv, ensure it is correctly added to your shell.
You may need to restart your terminal or run:
before pyenv commands are available.
2. Setup Virtual Environment (pyenv)
Install the required Python version - note you can use 3.12 if you prefer.
2. Clone the Main branch (unstable)
Clone the latest main of CARES Reinforcement Learning.
3. Install Requirements (UV)
Install the project and its requirements - note we are using the --active command to work inside of the pyenv environment.
uv environment usage
The --active flag installs dependencies into the currently active environment.
Ensure your pyenv environment is activated before running uv sync.
Installation methods
Use either the pip install -e .[gym] method or the uv sync method.
Do not mix both approaches in the same environment, as this can lead to dependency conflicts.
Verify Installation
After installation, verify that the CLI is available:
You should see the help description below if all things are installed correctly.