pyenv / pyenv
git clone https://github.com/pyenv/pyenv.git
v2.8.10 · 8d ago
🔥 on GitHub Trending today
Shell-based tool for installing and switching between multiple Python versions on a per-user or per-project basis.
Why you might care
Written in pure shell with no Python bootstrap needed, it uses a shim directory on PATH rather than shell loading, so it stays out of your way. Supports per-project version files and multiple distributions such as CPython, PyPy, and Stackless.
+-4
stars, 24h · #62,131
+40
stars, 7 days · #4,813
+131
stars, 30 days · #5,533
45k
★ total · +0% this week
3.3k
forks · 51 open issues
Star history (as recorded here)
LanguageShell
LicenseMIT
Created2012-08-31 (14y ago)
Last pushtoday
Watchers395
OwnerOrganization
Seen on GitHub Trending
- 2026-10-23 — #16 monthly in shell · +128 ★
- 2026-10-23 — #17 weekly in shell · +40 ★
- 2026-10-22 — #18 monthly in shell · +131 ★
- 2026-10-21 — #15 monthly in shell · +130 ★
- 2026-10-20 — #15 monthly in shell · +131 ★
GitHub topics
Links
- GitHub: github.com/pyenv/pyenv
- Releases · Issues · Hacker News mentions
README excerpt
# Simple Python Version Management: pyenv pyenv lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well. This project was forked from rbenv and ruby-build, and modified for Python. ### What pyenv _does..._ * Lets you **change the global Python version** on a per-user basis. * Provides support for **per-project Python versions**. * Supports **multiple Python distributions**: CPython, PyPy, Stackless Python, Jython, and more. See the full list of available versions. * Allows you to **override the Python version** with an environment variable. * Searches for commands from **multiple versions of Python at a time**. This may be helpful to test across Python versions with tox. ### In contrast with pythonbrew and pythonz, pyenv _does not..._ * **Depend on Python itself.** pyenv was made from pure shell scripts. There is no bootstrap problem of Python. * **Need to be loaded into your shell.** Instead, pyenv's shim approach works by adding a directory to your `PATH`. * **Manage virtualenv.** Of course, you can create virtualenv yourself, or pyenv-virtualenv to automate the process. ---- ## Table of Contents * **Installation** * Getting Pyenv * Linux/UNIX * Automatic Installer * Basic GitHub Checkout * MacOS * Homebrew in macOS * Windows * Set up your shell environment for Pyenv * Restart your shell * Install Python build dependencies * Upgrade Notes * **Usage** * Install additional Python versions * Prefix auto-resolution to the latest version * Python versions with extended support * Switch between Python versions * Making multiple versions available * Uninstall Python versions * Other operations * Upgrading * Upgrading with Homebrew * Upgrading with Installer or Git checkout * Uninstalling pyenv * Pyenv plugins * **How It Works** * Understanding PATH * Understanding Shims * Understanding Python version selection * Locating Pyenv-provided Python Installations * Advanced Configuration * Using Pyenv without shims * Running nested shells from Python-based programs * Environment variables * Manual shell setup * **Development** * Contributing * Version History * License ---- ## Installation ### A. Getting Pyenv ---- #### Linux/Unix The Homebrew option from the MacOS section below would also work if you have Homebrew installed. ##### 1. Automatic installer (Recommended) [code] For more details visit our other project: https://github.com/pyenv/pyenv-installer ##### 2. Basic GitHub Checkout This will get you going with the latest version of Pyenv and make it easy to fork and contribute any changes back upstream. * **Check out Pyenv where you want it installed.** A good place to choose is `$HOME/.pyenv` (but you can install it somewhere else): [code] * Optionally, try to compile a dynamic Bash extension to speed up Pyenv. Don't worry if it fails; Pyenv will still work normally: [code] #### MacOS The options from
Blurb generated by claude-haiku-5-5 today. Star deltas marked ~ are extrapolated from partial history.