一键导入
devenv-python-venv
Use on ModuleNotFoundError or import failures inside the devenv shell, or after a fresh venv. The venv exists but deps may not be installed.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use on ModuleNotFoundError or import failures inside the devenv shell, or after a fresh venv. The venv exists but deps may not be installed.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | devenv-python-venv |
| description | Use on ModuleNotFoundError or import failures inside the devenv shell, or after a fresh venv. The venv exists but deps may not be installed. |
| auto_trigger | {"keywords":["ModuleNotFoundError","import fails","no module named","fresh venv","uv sync","package not installed","editable install"]} |
languages.python.venv.enable = true creates a venv and puts it on PATH, but the project's
dependencies are not in it until a sync runs. Imports then fail with ModuleNotFoundError even
though "the venv is enabled."
Fix — install the deps into the active venv:
devenv shell -- uv sync --all-extras # generic
devenv shell -- repoman-sync # if the repo wires repoman (installs the toolchain)
Then run your command through the shell (devenv shell -- python …) so it uses that venv — see
the devenv-run-commands skill. Editable installs (uv pip install -e .) put your package on the
path so import yourpkg resolves to the working tree.
Grep-able detail: languages-python.md. If the command (not a Python import) is missing, it's a
PATH question — see command-not-found-in-shell.md / the devenv-troubleshoot skill.
For when in the lifecycle to sync, see the repoman skill.
Use when writing a scripts/tasks/processes entry or a manager module. Covers which surface to use, guarding enterShell echoes, and the 0/1/2/3 exit contract.
Use when editing devenv.yaml or adding an input/import. Covers flake:false for modules, nixpkgs-python for version pins, and transitive inputs.
Use when you edited a modules/ file, devenv.nix, or env.* and nothing changed. Resolves the lock + eval-cache staleness loop.
Use when starting a server or any long-running / heavy task. Use processes + devenv up; don't block the shell; poll logs instead of piping out of view.
Use when about to run pytest, python, uv, ruff, or any build/tooling command in this repo. Enforces running through the devenv shell.
Use on "command not found", the shell won't enter, or eval errors. A symptom→cause→fix decision tree for devenv repos.