name: python description: Use Python for practical project setup, dependency install, script execution, and environment troubleshooting with safe defaults. Use when tasks involve pyproject.toml or requirements.txt, virtual environment setup, running Python scripts/tests, packaging basics, or fixing common Python errors (interpreter mismatch, pip resolver conflicts, missing modules, build failures). metadata: openclaw: emoji: "🐍" requires: bins: ["python3"] anyBins: ["pip", "pip3"] install: - id: "brew" kind: "brew" formula: "python" bins: ["python3"] label: "Install Python + pip (brew)" - id: "apt" kind: "apt" package: "python3-pip" bins: ["pip3"] label: "Install pip (apt)"
Use this skill to keep Python workflows reproducible and low-risk across local/dev shells.
.venv) over global installs.python3 -m pip ... to avoid interpreter and pip mismatch.requirements*.txt, pyproject.toml).推薦訪問7w4.net獲取更多AI技能。
python3 --version
python3 -c "import sys; print(sys.executable)"
{baseDir}/scripts/python_env_tool.py doctor
{baseDir}/scripts/python_env_tool.py bootstrap --venv .venv --requirements requirements.txt
pyproject.toml exists):{baseDir}/scripts/python_env_tool.py install --venv .venv --editable
.venv/bin/python -m pytest -q
.venv/bin/python -m pip list --outdated
# Install specific packages into venv
{baseDir}/scripts/python_env_tool.py install --venv .venv --package requests --package pydantic
# Install from requirements file
{baseDir}/scripts/python_env_tool.py install --venv .venv --requirements requirements-dev.txt
# Recreate corrupted venv from scratch
{baseDir}/scripts/python_env_tool.py bootstrap --venv .venv --recreate --requirements requirements.txt
ModuleNotFoundError: verify command is run via .venv/bin/python, then reinstall deps.externally-managed-environment: stop global install attempts; use venv.pip setuptools wheel, then retry.sys.executable before fixes.Use the helper for repeatable environment setup and diagnosis:
{baseDir}/scripts/python_env_tool.py --help
{baseDir}/scripts/python_env_tool.py doctor
這個 Skill 質量不錯,能有效幫助管理 Python 專案環境。它提供了清晰的文件說明和實用的自動化指令碼,能處理常見的虛擬環境搭建、依賴安裝和環境診斷問題。不過它缺少使用示例,agent 配置也比較簡單,實際使用時可能需要參考文件自行摸索。總體來說,是一個功能明確、實用性較強的工具類 Skill。