pyenv-installer: A scripted way to install pyenv
This tool is used to install `pyenv` and friends.
At a glance
- What is it?
- pyenv-installer installs the pyenv version manager and its supporting environment from a shell command. It is aimed at developers who want repeatable pyenv setup, while the actual Python builds still require Git and platform-specific build dependencies.
- Who is it for?
- Adopt pyenv-installer when you want the documented, shell-based installation path for pyenv and can prepare the platform dependencies needed to compile Python. Do not treat it as a complete Python environment installer or a replacement for the pyenv documentation.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 16 days ago.
- What is it written in?
- Mainly Shell, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What pyenv-installer actually installs
pyenv-installer is a small installation tool for `pyenv` and related shell initialization. Its purpose is narrower than its name may first suggest: it does not install every Python version or provide a standalone Python runtime. The README says the tool installs `pyenv` and “friends,” then directs users to the `pyenv` repository for setting up the shell environment. That division matters. The installer places pyenv under `$PYENV_ROOT`, whose default is `~/.pyenv`, and its README treats later Python version selection as work performed through pyenv itself.
The intended users are developers who need to work across Python interpreter versions and want a repeatable installation step. A CI configuration can use the same script, although the documented Travis example requires special handling because Travis already defines `PYENV_ROOT`. The repository is not archived, and its last push was on 2026-10-07. There are no GitHub releases, so the documented update path is the relevant operational detail rather than release-based version selection.
The installation path and its prerequisites
The documented installation begins after Git has been installed. Git is a hard prerequisite because the installer obtains pyenv through Git. The README also warns that compiling your own Python interpreter generally requires the libraries and packages appropriate to the operating system. Those dependencies are separate from this repository. The README points to pyenv's installation wiki for common build problems, so a successful installer invocation does not guarantee that every requested Python version can compile.
The shortest documented command uses the `pyenv.run` redirect:
curl https://pyenv.run | bashThe README states that this redirect invokes the install script in this repository and is equivalent to fetching the raw script directly:
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bashThe script is executed by Bash. After it completes, the README says to follow the pyenv repository's shell setup instructions. That follow-up is necessary because installing the files and initializing the command environment are separate operations.
Selecting a pyenv release during installation
The installer supports one explicit version control mechanism at installation time. To install a named pyenv release instead of the latest head, set `PYENV_GIT_TAG` before running the installer. The README gives this example:
export PYENV_GIT_TAG=v2.2.5That environment variable is a concrete choice for reproducible setup. Without it, the README describes installing the latest head. It does not document a lockfile, a complete list of supported tags, or a checksum-verification procedure in the installer instructions. Teams that need controlled deployment should therefore record the chosen tag in their own configuration rather than assuming that a later invocation selects the same revision.
The repository's absence of GitHub releases is relevant here, but it does not prevent use of the documented Git tag. The distinction is between a repository revision and a release artifact. Users should also keep the pyenv repository's separate instructions in view because this project installs the manager rather than defining the complete lifecycle for Python interpreters and virtual environments.
Shell setup, updates, and removal
After installation, the README tells users to configure their shell through the pyenv repository instructions. The uninstallation procedure is more concrete. It says that pyenv is installed inside `$PYENV_ROOT`, defaulting to `~/.pyenv`, and gives this removal command:
rm -fr ~/.pyenvThe README then instructs users to remove three lines from `.bashrc`:
export PATH="$HOME/.pyenv/bin:$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"Finally, restart the shell with:
exec $SHELLThe update command is:
pyenv updateThese operations have different scopes. `pyenv update` updates the installed pyenv tool, while removing `~/.pyenv` removes the installation directory. The README does not describe rollback behavior, dependency cleanup beyond that directory, or how to preserve configuration when uninstalling.
A first pyenv-installer use on a development machine
After the installer has run and shell setup is complete, the first useful check is the `pyenv` command documented by the README. For a first Python installation example, the Travis section gives this command after adding pyenv to `PATH`:
pyenv install 3.5.2That command belongs to `pyenv`, not to `pyenv-installer`. The distinction prevents a common misunderstanding: the installer provisions the version manager, while `pyenv install` asks that manager to install a selected Python version. The README does not document the output of this command or guarantee that Python 3.5.2 will compile on a current operating system.
The documented Travis setup also shows a CI-specific workaround:
unset PYENV_ROOT
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
export PATH="$HOME/.pyenv/bin:$PATH"
pyenv install 3.5.2Unsetting `PYENV_ROOT` makes the installer use its normal location instead of an existing Travis-provided setting. This is useful context for automated environments, but the README does not describe other CI providers.
Build dependencies are the main adoption constraint
The clearest limitation is stated in the README's prerequisites: compiling a Python interpreter requires the appropriate libraries and packages for the operating system. `pyenv-installer` can install the manager, but it cannot make an incompatible or incomplete build environment suitable for compiling Python. A successful `curl | bash` step may therefore be followed by a failed `pyenv install` step.
The repository's Vagrant development setup can provide an isolated place to exercise the installer. The README instructs developers with Vagrant to run:
vagrant up
vagrant sshInside the mapped project directory, it gives this sequence:
cd /vagrant
python setup.py install
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrcThis setup is described as a project testing environment, not as a supported production installation method. It also depends on the Vagrant configuration and the host's ability to run it. For ordinary adoption, the operating-system build dependencies remain a separate responsibility.
pyenv-installer compared with installing pyenv directly
A real alternative is to install the `pyenv` repository directly with Git, without this installer. The difference is that `pyenv-installer` wraps the acquisition and setup into the documented `curl https://pyenv.run | bash` flow, while direct Git installation gives the operator explicit control over the clone operation and repository location.
That difference matters for environments where network piping is undesirable, where the organization requires a reviewed Git command, or where an existing `PYENV_ROOT` must be preserved. The Travis instructions demonstrate the conflict that can arise when `PYENV_ROOT` is already set, and the installer works around it by unsetting that variable before installation. The README does not document a configuration file for the installer, so direct Git remains the clearer choice when exact repository operations must be inspected before execution.
`pyenv-installer` is not a replacement for `pyenv`. It is a bootstrap convenience. The `pyenv` repository supplies the shell initialization and interpreter-management commands used after installation.
Editorial conclusion
Adopt pyenv-installer when you want the documented, shell-based installation path for pyenv and can prepare the platform dependencies needed to compile Python. Do not treat it as a complete Python environment installer or a replacement for the pyenv documentation. Verify first that Git is available, that `PYENV_ROOT` is suitable, and that the libraries required by your target Python versions are installed. The repository is not archived, and its last push was on 2026-10-07, but it has no GitHub releases, so pinning behavior should be checked through the documented `PYENV_GIT_TAG` mechanism.
Frequently asked questions
What does pyenv-installer install?
It installs `pyenv` and related shell setup. The README says to configure the shell afterward using instructions from the `pyenv` repository.
How do I install a specific pyenv release with pyenv-installer?
Set `PYENV_GIT_TAG` before running the installer, for example `export PYENV_GIT_TAG=v2.2.5`. Without that variable, the README describes installing the latest head.
What is required before installing a Python version through pyenv?
Git is required for the installer itself. Compiling a Python interpreter also generally requires libraries and packages appropriate for the operating system, with common build problems documented in the linked pyenv wiki.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/pyenv-pyenv-installer)Was this useful?