Create, manage, and validate Python virtual environments. Use for project isolation and dependency management.
Single responsibility: Create and manage Python virtual environments for project isolation. (BP-4)
Before executing, VERIFY:
DO NOT create venv without confirming Python version.
ASK USER instead of guessing when:
NEVER delete existing venv without confirmation.
| Context Type | Included | Excluded | |--------------|----------|----------| | RELEVANT | Python version, project deps, venv path | Application code | | PERIPHERAL | CI/CD requirements | Test configurations | | DISTRACTOR | Deployment configs | Other language envs |
# Available Python versions
which python3
python3 --version
# Check for existing venv
ls -la venv/ 2>/dev/null || ls -la .venv/ 2>/dev/null || echo "No venv found"
# Current active environment
echo "VIRTUAL_ENV: $VIRTUAL_ENV"
# Standard creation
python3 -m venv venv
# With specific Python version
python3.11 -m venv venv
# With system packages access
python3 -m venv venv --system-site-packages
# Verify creation
ls -la venv/bin/python
# Activate
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install from requirements.txt
pip install -r requirements.txt
# Or from pyproject.toml
pip install -e .
# Development dependencies
pip install -r requirements-dev.txt
# List installed packages
pip list
# Check for missing deps
pip check
# Export current state
pip freeze > requirements-lock.txt
On error:
venv creation failed → Check Python installationpip install failed → Check network, package availabilityactivation failed → Check shell compatibilitydependency conflict → Use pip-tools or poetryRollback command:
rm -rf venv && python3 -m venv venv
State saved to: .aiwg/working/checkpoints/venv-manager/
checkpoints/venv-manager/
├── python_version.txt # Python used
├── pip_freeze.txt # Installed packages
├── creation_log.txt # Creation output
└── validation_status.json # Health check results
| Command | Purpose |
|---------|---------|
| python3 -m venv venv | Create venv |
| source venv/bin/activate | Activate (bash/zsh) |
| venv\Scripts\activate | Activate (Windows) |
| deactivate | Deactivate |
| pip freeze > requirements.txt | Export deps |
| pip install -r requirements.txt | Install deps |
venv/ or .venv/ consistently.gitignorepip freeze or pip-toolsSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer