install-python-api
What it does
This skill installs the Python tools that let your code talk to the CARLA simulator. It is for people writing Python programs to control or read the simulation.
When to use it
- βWhen you want to write Python code that controls the CARLA simulator.
- βWhen a CARLA tool stops with an error saying the carla package cannot be imported.
- βWhen you have a new simulator version and need a Python client that matches it.
Skill link
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/setup/install-python-api/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you install the CARLA Python client on my computer so I can control the simulator with Python?β
5 new skills a week. 1 minute to read.
How it works
The agent checks what is already installed, picks the source that matches your simulator's version, and installs it into the Python setup you choose. It then confirms the client imports and, if a server is running, that the versions agree.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Install the CARLA Python client
Paths.
scripts/β¦andreferences/β¦below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.
The bootstrap step everything else in python-api depends on: without an
importable carla, every one of those skills stops at
FAIL cannot import carla. This skill fixes that, into the interpreter you
choose, and tells you when the client it installed does not match the
simulator you are running.
It is client-side only. Nothing here builds, launches or modifies a simulator.
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: detect β what is installed, which sources exist, what matches
- [ ] Step 3: install β auto-picks the best source, then verifies
- [ ] Step 4: verify against a running server when you have one
- [ ] Step 5: record `PYTHON` with `set_config` β the other skills read it
Step 1: Check prerequisites
bash scripts/check_env.sh
Steps 2-4: detect, install, verify
source scripts/env.sh
python3 scripts/install_python_api.py detect
python3 scripts/install_python_api.py install # auto
python3 scripts/install_python_api.py install --dry-run # show the pip line only
python3 scripts/install_python_api.py install --source pypi --version 0.9.16
python3 scripts/install_python_api.py verify
install is a no-op when carla already imports (--force to reinstall), and
every path ends by importing carla in the target interpreter β a pip exit code
is not treated as proof.
Which interpreter (the part people get wrong)
PYTHON selects the target; it defaults to python3 on PATH, and it is the same
variable the rest of the python-api group uses, so one setting covers them all.
PYTHON=/path/to/venv/bin/python python3 scripts/install_python_api.py install
This matters when an agent runs the skill. If the MCP server was started with
uvx/pipx/npx, that launcher puts its own isolated environment first on
PATH, so bare python3 is the tool's interpreter β commonly a different minor
version, and never the one that talks to CARLA. Installing the client there
achieves nothing. check_env.sh recognises those paths and says so. Set PYTHON
in the MCP client's env block once:
"env": { "PYTHON": "/home/me/carla-venv/bin/python" }
Sources, and why the order is not arbitrary
auto walks them in this order:
| # | Source | When it applies | Why this rank |
|---|---|---|---|
| 1 | local wheel β <root>/PythonAPI/carla/dist/carla-*-<cp tag>-*.whl |
CARLA_PACKAGE_ROOT or CARLA_UE4_ROOT is set and ships one |
it is the only artifact guaranteed to match your simulator |
| 2 | PyPI β pip install carla==X.Y.Z |
any interpreter PyPI has a wheel for | clean and offline-free, but you must name the right version |
| 3 | egg β carla-*-py<X.Y>-*.egg |
older releases that ship an egg | nothing to install; it goes on PYTHONPATH (written as a .pth inside a venv) |
Not covered here: building from source β that is [[build-carla-ue4]] step 04
(make PythonAPI), the right answer when no wheel exists for your interpreter.
Conda and Docker distributions are also out of scope.
PyPI coverage is real but partial β detect prints the live matrix, e.g.
0.9.16 -> cp310, cp311, cp312 (linux + windows, no macOS wheels). Ask for an
interpreter it has no wheel for and the skill refuses before pip does, naming
the tags that exist.
Version matching
CARLA's client and simulator are expected to be the same version; a mismatch
produces WARNING: Client API version = X / Simulator API version = Y on every
connection and subtly missing API. So:
- source 1 (local wheel) inherits the version from the release you actually have;
detect/verifyquery a reachable server and reportmatchorMISMATCH;- a mismatch is a WARN, not a failure β it is often intentional (talking to a remote server), so the skill reports it and continues.
numpy<2 is pinned in the same pip transaction: CARLA's bindings are built
against the numpy 1.x C API and crash on import under 2.x.
Examples
Example 1: only a downloaded release, no client installed
User says: "I downloaded CARLA and pip install carla-agentic-tools, now what?"
export
FAQ
Which Python setup does it use?
The one you choose, so it installs into the same Python your other CARLA tools use.
Will it change my simulator?
No. It only installs the client on your computer and does not build or change the simulator.
What if my client and simulator versions differ?
The skill tells you when they do not match, so you can fix it before running your code.
Details
Original description by the author
Installs the CARLA Python client (the `carla` package) into a chosen interpreter so the other python-api skills work β from a wheel bundled with your release or checkout, from PyPI (`pip install carla==X.Y.Z`), or by putting an older release's .egg on PYTHONPATH. Detects what is already present, picks the source that matches your simulator's version, pins numpy<2, and verifies `import carla` plus the client/server version match. Use when the user asks to "install the CARLA Python API", "pip install carla", "set up the carla python package", or when a skill reports "cannot import carla".
repo: carla-simulator/carla
Popularity
- GitHub stars
- 15k
- Ranking position
- #11118
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
create-leaderboard-route
15kHelps your agent build CARLA Leaderboard route files by placing waypoints and scenario triggers from the simulator camera, then checking and ordering them.
package-leaderboard-agent
15kHelps your agent package a driving agent into a Docker image for CARLA Leaderboard submission, checking the folder layout and testing that the image loads it.
read-leaderboard-results
15kHelps your agent read a CARLA Leaderboard results file, explain each route's score and infractions, and rescore a run under the other rule version.
run-leaderboard-evaluation
15kHelps your agent run the CARLA Leaderboard evaluator on a set of routes with your driving agent, checking the setup first and saving checkpoints you can resume.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.