install-python-api
하는 일
이 스킬은 내 코드가 CARLA 시뮬레이터와 통신하도록 하는 Python 도구를 설치합니다. 시뮬레이션을 제어하거나 읽는 Python 프로그램을 작성하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓Python 코드로 CARLA 시뮬레이터를 제어하고 싶을 때.
- ✓CARLA 도구가 carla 패키지를 가져올 수 없다는 오류로 멈출 때.
- ✓새 시뮬레이터 버전이 있어서 그에 맞는 Python 클라이언트가 필요할 때.
스킬 링크
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/setup/install-python-api/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“CARLA Python 클라이언트를 내 컴퓨터에 설치해서 Python으로 시뮬레이터를 제어할 수 있게 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 이미 설치된 것을 확인하고, 시뮬레이터 버전에 맞는 소스를 고른 뒤, 선택한 Python 환경에 설치합니다. 그다음 클라이언트가 가져와지는지 확인하고, 서버가 실행 중이면 버전이 맞는지도 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
어떤 Python 환경을 사용하나요?
사용자가 고른 환경입니다. 다른 CARLA 도구가 쓰는 같은 Python에 설치합니다.
시뮬레이터가 바뀌나요?
아니요. 클라이언트만 컴퓨터에 설치하며, 시뮬레이터를 빌드하거나 변경하지 않습니다.
클라이언트와 시뮬레이터 버전이 다르면 어떻게 하나요?
스킬이 버전이 맞지 않는다고 알려 주므로, 코드를 실행하기 전에 고칠 수 있습니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 15k
- 순위
- #11118
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-leaderboard-route
15k카메라 화면에서 웨이포인트와 시나리오 트리거를 배치하고, 확인하고, 순서를 정해 CARLA 리더보드 경로 파일을 만들도록 에이전트를 돕습니다.
package-leaderboard-agent
15k주행 에이전트를 CARLA Leaderboard 제출용 Docker 이미지로 패키징하고, 폴더 구조를 확인하며 이미지가 에이전트를 로드하는지 테스트하도록 돕습니다.
read-leaderboard-results
15kCARLA Leaderboard 결과 파일을 읽고 경로별 점수와 위반 사항을 설명하며, 다른 규칙 버전에서 실행을 다시 채점하도록 에이전트를 돕습니다.
run-leaderboard-evaluation
15k주행 에이전트로 경로 세트에 대한 CARLA Leaderboard 평가를 실행하도록 돕습니다. 먼저 설정을 확인하고, 재개할 수 있는 체크포인트를 저장합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.