Skill Python Env for Openclaw

An internal utility skill that automates the creation and management of shared Python virtual environments for other AI agent skills.

liberalchang
v1.0.0
Mar 31, 2026
0
978
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install skill-python-env

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install skill-python-env using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Skill Python Env?

Skill Python Env is a foundational internal tool within the Openclaw Skills ecosystem. It is designed to provide a consistent, versioned Python virtual environment (located at ~/.python_env/) that multiple skills can reuse, preventing redundant installations and saving disk space.

By leveraging the speed of uv, this skill ensures that required Python versions and packages are available on-demand. It operates with a zero-configuration philosophy, automatically installing uv if it is missing and handling environment setup silently in the background without requiring manual user intervention.

Skill Python Env Use Cases

  • Automating the setup of specific Python versions (e.g., 3.11 or 3.12) for AI agent tasks.
  • Sharing a single virtual environment across multiple Openclaw Skills to reduce overhead.
  • Ensuring idempotent installation of Python dependencies using uv pip.
  • Bootstrapping Python environments on fresh Linux, macOS, or Windows systems.

How Skill Python Env Works

  1. A primary skill triggers the ensure_python_env script with a specific Python version and optional package list.
  2. The skill checks for the existence of uv; if missing, it automatically downloads and installs it.
  3. It verifies if a virtual environment for the requested Python version already exists in the standard directory.
  4. If the environment is missing, it creates one and installs any specified Python packages using uv pip.
  5. The script outputs machine-readable environment variables (ACTIVATE path, DIR, and VERSION) to the stdout for the calling skill to parse and use.

Skill Python Env Setup

Since this is an internal utility, it is typically invoked via shell or Python scripts within the Openclaw environment.

Shell Invocation:

bash ~/.openclaw/skills/skill-python-env/scripts/ensure_python_env.sh 3.11 requests httpx

Python (uv run) Invocation:

uv run ~/.openclaw/skills/skill-python-env/scripts/ensure_python_env.py 3.11 --packages requests

Skill Python Env Data Schema & Taxonomy

The skill organizes environments by version number to ensure compatibility and reusability across the Openclaw Skills registry.

Path Segment Description
~/.python_env/ Root directory for all managed environments.
~/.python_env/<version>/ Specific environment folder (e.g., 3.11).
bin/activate The activation script for Linux/macOS.
Scripts/activate The activation script for Windows (Git Bash).

Skill Python Env Advanced Features

  • Idempotent Execution: Rapidly returns the environment path if the configuration is already satisfied.
  • Cross-Platform Support: Robust compatibility across Linux, macOS, and Windows (including Git Bash and PowerShell).
  • Automatic Python Provisioning: Uses uv to fetch specific Python binaries directly from official sources if they are not found locally.
  • Machine-Readable Outputs: Provides structured grep-friendly output strings for seamless integration into complex multi-agent workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*