Python Env Setup

v1.0.0

Host-specific Python execution guidance for OpenClaw on this machine. Prefer $PYTHON over python/python3 in PATH, because OpenClaw exec runs in a non-interac...

0· 310·1 current·1 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The name/description state a host-specific policy for running Python; requiring a PYTHON env var (declared as primaryEnv) directly supports that purpose. There are no unrelated binaries, services, or secrets requested.
Instruction Scope
SKILL.md contains concrete shell patterns for checking and using the PYTHON executable, pip usage, and a strict fallback policy. It does not instruct reading other files, harvesting environment variables, or calling external endpoints aside from normal pip installs when the agent runs pip (which is expected for package installation).
Install Mechanism
No install spec and no code files are present (instruction-only), so nothing is written to disk or downloaded by the skill itself.
Credentials
Only the PYTHON environment variable is required and justified by the skill's purpose. PYTHON here represents a path to an interpreter (not a secret); no unrelated TOKEN/KEY/PASSWORD variables are requested.
Persistence & Privilege
always is false and the skill does not request persistent system-wide changes or permissions. Model invocation defaults remain enabled (normal for skills) but this skill does not request elevated privileges.
Assessment
This skill is straightforward and safe in scope: it tells the agent to use an explicit PYTHON environment variable for running Python. Before installing or enabling it, ensure PYTHON points to the interpreter you trust (not a wrapper or malicious binary). Be aware that following its examples may cause the agent to run pip installs (network activity and package execution) — only allow that if you trust the packages and the agent's actions. Otherwise, no additional secrets or installers are required.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🐍 Clawdis
EnvPYTHON
Primary envPYTHON
latestvk975wr2t8bxytc0jkp613nmp9h82np4k
310downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

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

test -x "$PYTHON"
"$PYTHON" --version

Common patterns

Install packages

"$PYTHON" -m pip install -U package_name
"$PYTHON" -m pip install -U openai-whisper torch ffmpeg-python

Run a script

"$PYTHON" script.py

Run a module

"$PYTHON" -m module_name

Run inline Python

"$PYTHON" - <<'PY'
print('hello')
PY

Quick guard pattern

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.

Comments

Loading comments...