DOKK / manpages / debian 13 / pyenv / pyenv-install.1.en
PYENV-INSTALL(1) User Commands PYENV-INSTALL(1)

pyenv-install - Install a Python version using python-build

pyenv install [options] <version>...

pyenv install [options] <definition-file>

pyenv install -l | --list

pyenv install --version

The pyenv install command allows you to install Python versions using python-build, a tool for compiling and installing Python versions from source.

List all available versions that can be installed.
Install the version even if it is already installed.
Skip the installation if the version is already installed.
Keep the source tree in the build root directory after installation.
Apply a patch from standard input before building.
Enable verbose mode, printing detailed information during installation.
Show the version of the python-build tool.
Enable debug mode for detailed logging of the installation process.

To install a specific version of Python, such as Python 3.9.6:

$ pyenv install 3.9.6

To list all available Python versions:

$ pyenv install --list

To force the installation of a version even if it is already installed:

$ pyenv install -f 3.8.10

To install Python 3.7.9 and keep the source tree after installation:

$ pyenv install -k 3.7.9

Written by Yamashita, Yuu <peek824545201@gmail.com>, Sam Stephenson <sam@sls.name>.

This manual page was written by Josenison F. da Silva <nilsonfsilva@hotmail.com> for the Debian project (but may be used by others).

February 2025 pyenv-install manual