Installation Guide

UrbanMARL is a vectorized multi-agent reinforcement learning simulation platform for 6G network digital twins built natively on PyTorch and TorchRL.

Prerequisites

Before installing UrbanMARL, ensure your system meets the following requirements:

  • Python: \(\ge 3.10\) (tested thoroughly on Python 3.12).

  • PyTorch: \(\ge 2.2.0\) (CUDA-enabled GPU recommended for large vectorized batches).

  • Operating System: Linux (Ubuntu 22.04 or later; 26.04 recommended), Windows (WSL2), or macOS.

Method 2: Installation using Standard pip

If you prefer using standard Python venv and pip:

Step 1: Create Virtual Environment

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip

Step 2: Install Package

From PyPI:

pip install urbanmarl

From Source (Editable / Development):

git clone https://github.com/yemenlinux/vUrbanMARL.git
cd vUrbanMARL
pip install -e .[test,docs]

Note

If pip defaults to CPU-only PyTorch on an NVIDIA GPU system, you can explicitly specify the CUDA extra index URL matching your driver:

   pip install -e .[test,docs] --extra-index-url https://download.pytorch.org/whl/cu126

For other later CUDA versions, replace ``cu126`` with the appropriate version (e.g., ``cu130`` for CUDA 13.0 or ``cu132`` for CUDA 13.2).

Verifying Installation

Verify that UrbanMARL and TorchRL are correctly installed and hardware acceleration is functioning:

python -c "import torch, urbanmarl; print(f'UrbanMARL version: {urbanmarl.__version__}, CUDA available: {torch.cuda.is_available()}')"

To run the unit test suite and verify that all registered scenarios load properly:

pytest tests/