environment-triage

用于诊断 Python 环境异常,精准定位因解释器版本不匹配导致的依赖安装失败或模块导入错误,通过验证实际运行环境、版本约束与包可用性,确保 uv 工具链与项目需求一致。

快捷安装

在终端运行此命令,即可一键安装该 Skill 到您的 Claude 中

npx skills add parcadei/Continuous-Claude-v3 --skill "environment-triage"

Environment Triage

When uv sync or pip install behaves unexpectedly, check the actual interpreter.

Pattern

System Python is not authoritative if uv/venv selects a different interpreter.

DO

# What uv ACTUALLY uses
uv run python --version

# What's pinned (this controls uv)
cat .python-version

# Confirm package is installed
uv pip show <package>

# Confirm import works in uv context
uv run python -c "import <package>; print(<package>.__version__)"

Common Fix

If optional deps require Python 3.12+ but .python-version is 3.11:

echo "3.13" > .python-version
rm -rf .venv && uv venv && uv sync --all-extras

DON’T

  • Trust python3 --version when using uv
  • Assume install succeeded without verifying import
  • Debug further before checking interpreter version

Source Sessions

  • 2243c067: symbolica-agentica skipped due to python_version >= 3.12 marker, but uv was using 3.11
  • 4784f390: agentica import failures traced to wrong interpreter