Overview
- Skill Key
- cndaqiang/py-env-setup
- Author
- cndaqiang
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/cndaqiang/py-env-setup
- Latest Commit SHA
- 713d072406ec5d196730574c852a3283566e7dbe
Host-specific Python execution guidance for OpenClaw on this machine. Prefer $PYTHON over python/python3 in PATH, because OpenClaw exec runs in a non-interactive shell and may not inherit interactive shell initialization.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 py-env-setup 技能。 若已安装,则直接安装 py-env-setup 技能。
# Python Environment Setup
Use this skill whenever OpenClaw needs to run Python on this host.
## Why this exists
On this machine, OpenClaw `exec` runs in a **non-interactive shell**.
Interactive shell initialization may be skipped, so `python`, `python3`, or `conda` may be unavailable from PATH even though they work in a normal terminal.
Therefore, prefer the explicit Python entrypoint provided by environment variable `PYTHON`.
## Rules
1. Prefer `"$PYTHON"` over `python` or `python3`.
2. Do not rely on `source ~/.bashrc` or `conda activate` for routine automation.
3. Before using Python, verify it exists and is executable.
4. Use `"$PYTHON" -m pip ...` for package installation.
5. Use `"$PYTHON" script.py`, `"$PYTHON" -m module`, or `"$PYTHON" -c '...'` for execution.
6. Apply this rule to **all Python-related commands**, not just pip.
7. If `PYTHON` is unset or invalid, report the problem clearly.
## Validation
```bash
test -x "$PYTHON"
"$PYTHON" --version
```
## Common patterns
### Install packages
```bash
"$PYTHON" -m pip install -U package_name
"$PYTHON" -m pip install -U openai-whisper torch ffmpeg-python
```
### Run a script
```bash
"$PYTHON" script.py
```
### Run a module
```bash
"$PYTHON" -m module_name
```
### Run inline Python
```bash
"$PYTHON" - <<'PY'
print('hello')
PY
```
### Quick guard pattern
```bash
test -x "$PYTHON" || { echo "PYTHON not executable: $PYTHON" >&2; exit 1; }
"$PYTHON" --version
```
## Fallback policy
Only if the task explicitly allows fallback, try in this order:
1. `$PYTHON`
2. `python3`
3. `python`
Default policy: **do not silently fallback**. Prefer failing loudly if `$PYTHON` is missing, so environment issues are obvious.
## Notes
- This skill is host-specific.
- It is meant to guide OpenClaw runtime behavior, not teach Python itself.
- The `PYTHON` value is read from the environment. This skill does not require a specific env-file location.
capt-marbles
Task Router
capncoconut
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay, check marketplace stats, or manage agent credentials. Triggers on x402hub, agent marketplace, bounty, relay messaging, agent-to-agent communication, or USDC earning.
capevace
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
captchasco
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.
carol-gutianle
name: modelready description: Start using a local or Hugging Face model instantly, directly from chat. metadata: {"openclaw":{"requires":{"bins": "bash", "curl" }, "env": "URL" }}
canbirlik
Controls Wiz smart bulbs (turn on/off, RGB colors, disco mode) via local WiFi.