Where Are pyenv Python Versions Installed?
pyenv installs each Python version into its own folder under the versions directory. Shims and version files select which installed version runs in a given shell or folder.
Last updated
pyenv keeps all interpreters under a single root. Each version string maps to a folder inside versions.
The root defaults to ~/.pyenv on macOS and Linux and to a pyenv-win folder on Windows. Overrides come from PYENV_ROOT and helpers such as pyenv root and pyenv versions.
Where pyenv stores this, by platform
~/.pyenv/versions/<version>
Replace <version> with the full version string, for example 3.12.4. Find the root with pyenv root. List installed versions with pyenv versions. The shims folder under the same root provides selected binaries.
~/.pyenv/versions/<version>
Replace <version> with the full version string, for example 3.12.4. PYENV_ROOT defaults to ~/.pyenv. Versions are built from source. Plugin environments live under versions as envs subfolders when the virtualenv plugin is used.
C:\Users\<user>\.pyenv\pyenv-win\versions\<version>
Replace <user> with the Windows account name and <version> with the installed version string. pyenv-win is a separate Windows port with shims and versions under its own root. Common setup sets PYENV, PYENV_ROOT, and PYENV_HOME to the pyenv-win folder. Delete a version folder to remove it only when uninstall leaves files behind.
Frequently asked questions
How do I confirm which Python pyenv will use?
Run pyenv version to show the selected version and its origin file. Run pyenv versions to list installed folders. Run pyenv which python to show the resolved executable path.
Can I change the install location?
Set PYENV_ROOT before install to move the whole root, including versions and shims. On Windows set the pyenv-win variables to the chosen folder. Symlink the versions folder to another disk if only that part needs to move.
Notice an outdated path? Let us know.