Forrest logo
back to the pyenv tool

pyenv:tldr:7fedd

pyenv: List all Python versions under the `${PYENV_ROOT}/versions` directory.
$ pyenv versions
try on your machine

The "pyenv versions" command is used with the pyenv tool, which is a command-line utility used for managing multiple versions of Python on a single system.

When you run "pyenv versions" in the command-line, it will display a list of all the Python versions that are currently installed on your system and managed by pyenv. Each version corresponds to a separate installation of Python that you can switch between using pyenv.

The output of "pyenv versions" typically includes the version number, followed by an indicator of whether it is the currently active version or not. For example:

* 3.9.6 (set by /path/to/python/version)
  2.7.18
  3.8.10
  3.10-dev

In this example, version 3.9.6 is the currently active version, as indicated by the asterisk (*) preceding it. The "/path/to/python/version" represents the file or location that specifies the currently active version. The other versions listed are additional Python versions installed on the system but are not currently active.

The "pyenv versions" command is helpful for checking the available Python versions and identifying the currently active version before switching between versions using the "pyenv global", "pyenv local", or "pyenv shell" commands.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pyenv tool