pyenv-install1
Install a python version using python-build
Usage
pyenv install
[options]
<version> ...
pyenv install
[options]
<definition-file>
pyenv {install
-l | --list}
pyenv install
--version
Overview
The pyenv install command allows you to install Python versions using python-build, a tool for compiling and installing Python versions from source.
Options
-
-l, --list -
List all available versions that can be installed.
-
-f, --force -
Install the version even if it is already installed.
-
-s, --skip-existing -
Skip the installation if the version is already installed.
-
-k, --keep -
Keep the source tree in the build root directory after installation.
-
-p, --patch -
Apply a patch from standard input before building.
-
-v, --verbose -
Enable verbose mode, printing detailed information during installation.
-
--version -
Show the version of the python-build tool.
-
-g, --debug -
Enable debug mode for detailed logging of the installation process.
Examples
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