pyenv
Files
SKILL.mdagentsreferences
Install
Install only this skill with npx skills
npx skills add alisonaquinas/llm-ci-dev --skill 'pyenv' -g -y
Install the containing skill bundle
/plugin install ci-cd@llm-skills
This skill is bundled inside ci-cd. Use
npx skills when you only want this skill, or install the bundle once to make every included skill available through the plugin marketplace flow. Browse the full skill bundle repository at github.com/alisonaquinas/llm-ci-dev.Invoke
Invoke this skill after installation
/ci-cd:pyenv
SKILL.md
name: pyenv description: Manage multiple Python versions with pyenv. Use when tasks mention pyenv, Python version switching, .python-version, or pyenv-virtualenv.
pyenv
Intent Router
| Request | Reference | Load When |
|---|---|---|
| pyenv-installer, Homebrew, build dependencies, shell integration | references/install-and-setup.md | pyenv needs to be installed or the shell integration is missing |
| install/global/local/shell/versions/which commands | references/command-cookbook.md | Specific pyenv commands are needed |
| pyenv-virtualenv plugin, virtualenv creation, auto-activation | references/virtualenvs.md | Virtual environment management with pyenv is the topic |
| .python-version, shell > local > global, PYENV_VERSION | references/project-files.md | Project-level Python version pinning or precedence is the topic |
Quick Start
# Install Python 3.12.3
pyenv install 3.12.3
# Set as global default
pyenv global 3.12.3
# Pin version for a project (writes .python-version)
pyenv local 3.12.3
# Confirm active version
pyenv version
Core Command Tracks
- Install Python:
pyenv install 3.12.3 - Global default:
pyenv global 3.12.3 - Project pin:
pyenv local 3.12.3(writes.python-version) - Shell override:
pyenv shell 3.11.9(current shell only) - List installed:
pyenv versions - List available:
pyenv install --list - Resolve binary:
pyenv which python
Safety Guardrails
- Install OS build dependencies before running
pyenv installto avoid compilation failures. - Commit
.python-versionto version control so all contributors use the same Python. - Use
pyenv-virtualenvfor project-level virtual environments rather than system venv directly. - Set
PYENV_VERSIONin CI only if.python-versionis not present in the repository.
Workflow
- Install build dependencies for the OS (see
references/install-and-setup.md). - Install the target Python:
pyenv install <version>. - Set global default:
pyenv global <version>. - For a project,
cdinto the directory and runpyenv local <version>. - Create a virtualenv:
pyenv virtualenv <version> <name>and activate it.
# Troubleshoot: python command resolves to wrong version, force-reinitialize shims
pyenv which python
pyenv rehash
pyenv version
Related Skills
- pip — Python package installer used within pyenv-managed environments
- poetry — dependency and virtualenv manager that works with pyenv
- pipenv — Pipfile-based environment manager that integrates with pyenv
- asdf — universal version manager that also handles Python
References
references/install-and-setup.mdreferences/command-cookbook.mdreferences/virtualenvs.mdreferences/project-files.md- Official repo: https://github.com/pyenv/pyenv
- Common build problems: https://github.com/pyenv/pyenv/wiki/Common-build-problems
- Full command reference: https://github.com/pyenv/pyenv/blob/master/COMMANDS.md