Installing CARLA Simulator: A Comprehensive Guide

Installation Guide for CARLA Simulator

Available Versions

Two versions of CARLA are available for installation:

  • Source Version: Requires compilation from source code, suitable for development purposes (available on GitHub)
  • Binary Version: Pre-compiled binaries, easier to install, ideal for learning and evaluation (available on the official website)

System Compatibility

Installation resources are available for both Windows and Ubuntu operating systems.

Windows Installation Procedure

Downloading Required Files

Download the following two files and extract them to a dedicated folder (preferably on a drive with sufficient storage space). This organization will help troubleshoot potential installation issues.

Configuration Process

The PyAPI folder contains example scripts for controlling vehicles and setting NPC counts. During installation, you may encounter challenges with the CARLA Client Library installation. For the Downloadable component, open a PowerShell terminal, activate your CARLA virtual environment, and install the required packages using pip commands.

Note: Some packages may not install successfully with conda but can be installed using pip commands.

Ubuntu 20.04 Installation

Pip3 Version Verification

First, verify your pip3 version meets the requirement (≥20.3):

pip3 -V

If the version doesn't meet the requirement, upgrade pip3:

pip3 install --upgrade pip

Configuring Pip3 Path

After upgrading pip3, update your .bashrc file with the installation path:

# Navigate to your home directory
cd ~
# Edit the .bashrc file
nano .bashrc
# Add the following line at the end (replace with your actual installation path)
export PATH="/home/yourusername/.local/bin:$PATH"
# Save the file and exit
# Apply the changes
source .bashrc

Installing Dependencies

Once pip3 is properly configured, install the required dependencies:

pip3 install --user pygame numpy

Adding CARLA Repository

Add the CARLA repository to your system's package sources:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1AF1527DE64CB8D9
sudo add-apt-repository "deb [arch=amd64] http://dist.carla.org/carla $(lsb_release -sc) main"

If you encounter issues with the repository, consider using the GitHub version instead.

Running CARLA Examples

Launch the CARLA simulator by double-clicking the CarlaUE4.exe file. The first launch may take some time. Once loaded, navigate to the examples directory.

To run example scripts, use the following command in your terminal:

python <example_name>.py

Press Tab after typing the example name to enable auto-completion. Refer to the CARLA documentation for specific details about each example's functionality.

Tags: CARLA simulator installation Windows Ubuntu

Posted on Fri, 26 Jun 2026 17:34:28 +0000 by ant peacocke