npx skills add ...
npx skills add nvidia/cosmos-framework --skill cosmos3-env-troubleshoot
Diagnose and fix Cosmos3 environment, installation, and runtime errors. Use when the user encounters an ImportError, ModuleNotFoundError, CUDA error, Docker error, checkpoint download failure, or any traceback during setup or inference.
npx skills add nvidia/cosmos-framework --skill cosmos3-env-troubleshoot
All paths below are relative to this file's location (.claude/skills/cosmos3-env-troubleshoot/).
Check the error message against the table below. Each row links to the canonical fix in the docs.
| Error signature | Cause | Fix location |
|---|---|---|
ImportError: cannot import name '_functionalization' from 'torch._C' | NGC container library conflict | ../../../docs/setup.md § PyTorch Import Issue — run export LD_LIBRARY_PATH='' |
ModuleNotFoundError: No module named 'cosmos_framework' | Package not installed | ../../../docs/setup.md § Dependency Issue — run uv sync --all-extras --group=cu130-train --reinstall |
ModuleNotFoundError: No module named <other> | Dependency missing | ../../../docs/setup.md § Dependency Issue — reinstall venv |
fatal error: Python.h: No such file or directory | Broken Python / uv install | ../../../docs/setup.md § Python Issue — reinstall uv + venv from scratch |
OSError: <lib>: cannot open shared object file | CUDA version mismatch | ../../../docs/setup.md § CUDA Issue — install matching cuda-toolkit-<major> |
docker: Error response from daemon: unknown or invalid runtime name: nvidia | Docker nvidia runtime not configured | ../../../docs/setup.md § Docker Container — run sudo nvidia-ctk runtime configure --runtime=docker |
| HuggingFace 401 / download failures | Auth or license not accepted | ../../../docs/setup.md § Downloading Base Checkpoints — check HF_TOKEN, accept license agreement |
Run these diagnostic commands to collect information, then attempt fixes in order:
Clear library path: export LD_LIBRARY_PATH=''
Reinstall venv: uv sync --all-extras --group=cu130-train --reinstall (or cu128-train on older drivers; drop -train only if you intentionally want the inference-only group)
Reinstall uv + venv from scratch:
Check CUDA version alignment: the major CUDA version from nvidia-smi must match torch.version.cuda
Try Docker: if the host environment is too broken, fall back to the Docker container (see ../../../docs/setup.md)
If none of the above resolves the issue, collect environment information and present the user with a pre-filled bug report they can submit as a GitHub issue.
Fill in the template below by running the diagnostic commands and inserting the results: