Install & Compatibility
Where this runs
tested against v0.9.16 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✓ 2.3s
py 3.11
✕ build_error
✓ 3.4s
py 3.12
✕ build_error
✓ 2.6s
py 3.13
✕ build_error
✕ build_error
193MB installed
● package 193MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Client
✓ import carla; client = carla.Client('localhost', 2000)
✗ from carla.client import CarlaClient
Old API (pre-0.9.6) used CarlaClient. Modern API uses carla.Client.
World
✓ import carla; world = client.get_world()
✗ from carla import World
World is not directly importable; obtained via Client.
Vehicle
✓ import carla; vehicle = blueprint.library.find('vehicle.*')
✗ from carla import Vehicle
Vehicle objects are spawned from blueprints.
Connect to CARLA server, spawn a random vehicle, and clean up.
import carla
import random
client = carla.Client('localhost', 2000)
client.set_timeout(10.0)
world = client.get_world()
blueprint_library = world.get_blueprint_library()
bp = random.choice(blueprint_library.filter('vehicle.*'))
transform = carla.Transform(carla.Location(x=50, y=50, z=10), carla.Rotation(yaw=180))
vehicle = world.spawn_actor(bp, transform)
print(f'Spawned {vehicle.id}')
vehicle.destroy()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'carla'
CARLA Python client is not installed.
fixRun: pip install carla
RuntimeError: unable to connect to server at localhost:2000
CARLA server is not running or port is incorrect.
fixStart the CARLA simulator binary before running the script. Default port 2000.
AttributeError: module 'carla' has no attribute 'Client'
Outdated carla package or wrong import (e.g., from carla.client import Client).
fixUse: import carla; client = carla.Client('localhost', 2000) Upgrade
Version history
0.9.16latest on PyPI · released Sep 14, 2025
Audit
Dependencies
numpyoptionalCommonly used with carla for arrays
PillowoptionalImage processing from carla sensors