> ## Documentation Index
> Fetch the complete documentation index at: https://salesforce-ai-economist.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install Foundation via pip or from source

Foundation requires **Python 3.7 or later**. No GPU is needed to run the simulation; a GPU is only required if you plan to accelerate RL training with WarpDrive.

## Install via pip

The quickest way to install Foundation is from PyPI:

```bash theme={null}
pip install ai-economist
```

This installs version **1.7.1** along with all required dependencies (NumPy, SciPy, Pandas, Matplotlib, and others listed in `requirements.txt`).

## Install from source

Installing from source lets you edit the framework code and run the included tutorials.

**1. Clone the repository**

```bash theme={null}
git clone https://github.com/salesforce/ai-economist
```

**2. Create and activate a conda environment**

```bash theme={null}
conda create --name ai-economist python=3.7 --yes
conda activate ai-economist
```

> [!TIP]
>
> Add the following alias to your `~/.bashrc` or `~/.bash_profile` for quick access:
>
> ```bash theme={null}
> alias aiecon="conda activate ai-economist; cd <local path to ai-economist>"
> ```
>
> Then run `aiecon` once to activate the environment and change to the project directory.

**3. Install the package**

Choose one of the two approaches:

```bash Editable install (recommended) theme={null}
cd ai-economist
pip install -e .
```

```bash PYTHONPATH (no install) theme={null}
export PYTHONPATH=<local path to ai-economist>:$PYTHONPATH
```

The editable install (`-e .`) is recommended because it keeps the installed package in sync with any source edits you make.

**4. Verify the installation**

```bash theme={null}
conda activate ai-economist
python -c "import ai_economist"
```

No output means the import succeeded. If you see an `ImportError`, double-check that the conda environment is active and that the install step completed without errors.

## Optional: GPU-accelerated training with WarpDrive

Foundation integrates with [WarpDrive](https://arxiv.org/abs/2108.02976), a high-throughput multi-agent RL framework that runs thousands of environment rollouts in parallel on a single GPU. To enable WarpDrive support, install the extra package:

```bash theme={null}
pip install rl-warp-drive
```

> [!NOTE]
>
> WarpDrive requires a CUDA-capable GPU. It is not needed to run or explore Foundation simulations—only for large-scale GPU training.

## Dependencies

The key runtime dependencies installed by `pip install ai-economist` are:

| Package | Version | Purpose |
| - | - | - |
| `numpy` | 1.21.0 | Array operations throughout the simulation |
| `scipy` | 1.6.3 | Statistical distributions and signal processing |
| `pandas` | 1.2.4 | Dataset handling (COVID-19 data) |
| `matplotlib` | 3.2.1 | Visualization utilities |
| `pyyaml` | 5.4.1 | Configuration file parsing |

All pinned versions are in [`requirements.txt`](https://github.com/salesforce/ai-economist/blob/master/requirements.txt).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.