python-virtual-env

Creates and validates project-local Python virtual environments for isolated pip installs.

8|7|Updated Feb 14, 2023
One-click install
npx skills add https://github.com/eclipse-slm/slm --skill python-virtual-env-eclipse-slm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-virtual-env
Source: https://github.com/eclipse-slm/slm/tree/main/.agents/skills/python-virtual-env
Command: npx skills add https://github.com/eclipse-slm/slm --skill python-virtual-env-eclipse-slm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up isolated Python environments manually is error-prone: packages leak into the system Python, wrong interpreter versions get used, and virtual environment directories end up committed to git. This Skill creates, validates, or re-creates a project-local virtual environment with strict guardrails that never touch the host system Python. ## Core Features & Use Cases - Managed environment lifecycle: Create, re-create, validate, or delete a single managed environment (default .venv) at a user-specified name or path, with version matching against the requested Python release. - Safe package installation: Install packages or requirements files using only the managed environment's own pip, never the host pip or another environment. - Repository hygiene: Automatically add the environment directory to .gitignore and to galaxy.yml build_ignore when present. - Use Case: Before running a project's test suite or CLI tooling locally, ask the agent to set up .venv with Python 3.11 and install requirements.txt, then reuse <managed-env>/bin/python for all subsequent commands. ## Quick Start Set up a Python virtual environment at .venv using Python 3.11 and install the packages from requirements.txt into it.

Frequently Asked Questions about python-virtual-env

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Python virtual environment for my project?▼

Request a virtual environment by name or path, defaulting to .venv at the project root. The environment is created with the venv module by default, validated with python --version, and added to .gitignore automatically.

How do I install packages into a virtual environment with pip?▼

Specify package names or requirements file paths when setting up the environment. Installation uses only the managed environment's own pip at <managed-env>/bin/pip, never the host pip, pip3, or another environment.

Can I use a specific Python version for my virtual environment?▼

Yes, request a version like 3.11 or 3.11.8 and it is matched against the environment's python --version output. If the version is unavailable with venv, tools like uv, pyenv, or conda may be suggested with your permission.

What happens if my virtual environment has the wrong Python version?▼

An existing environment whose version does not match the request is re-created: only the managed environment path is deleted and rebuilt with the correct interpreter. Python is never changed in place inside an existing venv.

When should I not use a local virtual environment?▼

Skip local environment setup when the user requests the host system Python, container-only workflows, or ansible-test --docker runs, since those scenarios do not require a project-local venv.