Command-line tool for installing and switching between multiple Python versions globally, per project, or per shell session.
pyenv/pyenv-installer
A shell script that installs pyenv, the Python version manager, along with its helper tools, and updates or removes them later.
- Stars
- 4,130
- Forks
- 453
- Open issues
- 9
- Last commit
- last month
What is it?
pyenv-installer is a small shell script that bootstraps pyenv, a tool for installing and switching between multiple Python interpreter versions, together with its related plugins. Running a single curl command fetches the installer and places pyenv under ~/.pyenv by default. Setting the PYENV_GIT_TAG variable pins the install to a specific pyenv release instead of the latest development head.
The script also handles later maintenance. The pyenv update command refreshes an existing installation, and uninstalling is a matter of removing the ~/.pyenv directory and the shell configuration lines it added. Setting USE_SSH makes the git clone use SSH rather than HTTPS. Git is the only required tool, although compiling Python itself needs system build libraries, which the project links to a wiki page listing per-OS requirements.
The repository also documents use in CI environments such as Travis CI, where PYENV_ROOT may already be set by the host image and needs to be unset first.
Key features
- 01Installs pyenv with a single curl command.
- 02Pins the installation to a specific pyenv release via PYENV_GIT_TAG.
- 03Updates an existing installation with pyenv update.
- 04Supports SSH-based git cloning through USE_SSH.
- 05Provides straightforward manual uninstall steps.
Use cases
- Setting up pyenv on a new development machine.
- Installing a pinned pyenv version in a CI pipeline such as Travis CI.
- Managing multiple Python versions on a shared server.
Quick start
- 1
Make sure Git is installed
- 2
Run the official install script from the README
- 3
Set up your shell environment for pyenv by following the pyenv instructions
Things to know
- Compiling Python versions requires system build libraries and packages that you must install yourself.
- Installation is a shell script run via curl piped into bash, and shell environment setup is a manual step.
Topics
FAQ
- What is pyenv-installer?
- A shell script that installs pyenv, the Python version manager, along with its helper tools, and updates or removes them later. pyenv-installer is a small shell script that bootstraps pyenv, a tool for installing and switching between multiple Python interpreter versions, together with its related plugins. Running a single curl command fetches the installer and places pyenv under ~/.pyenv by default. Setting the PYENV_GIT_TAG variable pins the install to a specific pyenv release instead of the latest development head.
- Is pyenv-installer free to use? What license does it have?
- pyenv-installer is open source under the MIT license. Check the license terms before using it in commercial products.
- Is pyenv-installer still maintained?
- Updated within 6 months. The last commit to pyenv-installer was on Oct 7, 2026.
- What can I use pyenv-installer for?
- Setting up pyenv on a new development machine. Installing a pinned pyenv version in a CI pipeline such as Travis CI. Managing multiple Python versions on a shared server.
- How do I install pyenv-installer?
- Make sure Git is installed Run the official install script from the README Set up your shell environment for pyenv by following the pyenv instructions
- Where can I get pyenv-installer?
- The source code and installation instructions are on GitHub: https://github.com/pyenv/pyenv-installer
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A cross-platform version manager for development runtimes like Node.js, Java, Go and Python, extendable through plugins.
Homebrew's default collection of cask definitions for installing prebuilt GUI apps, CLI tools and fonts from upstream vendors via the brew CLI.
A minimalist, portable package manager for Windows that installs each package into its own directory with isolated environments.
A POSIX-compliant bash script for installing and switching between multiple Node.js versions per user and per shell.
A CLI version manager that switches runtime versions per project for many languages through a plugin system.