Forrest logo
tool overview
On this page you find all important commands for the CLI tool pyenv. If the command you are looking for is missing please ask our AI.

pyenv

Pyenv is a powerful command line tool used for managing multiple Python versions on a single machine. It allows developers to easily switch between different versions of Python without affecting the system's default Python installation. With pyenv, you can install and manage different Python interpreters, including CPython, PyPy, and even custom builds.

One of the main advantages of pyenv is that it enables you to create virtual Python environments using different versions. This is particularly useful when working on projects that require specific Python versions or when testing compatibility across different releases. Pyenv also allows for the installation of Python packages on a per-project basis, ensuring each project's dependencies are isolated.

Pyenv makes it easy to switch Python versions globally or locally, making it ideal for managing Python installations across different projects. Furthermore, by using pyenv, you can set the Python version for a particular directory or even define different versions for specific shell sessions.

The pyenv command line tool provides various functionalities, including installing Python versions, managing virtual environments, listing available Python versions, uninstalling interpreters, and more. Additionally, it integrates with other tools like pip and setuptools, allowing you to easily manage packages for each version.

Pyenv is highly configurable, allowing you to customize its behavior by modifying its environment variables and shell hooks. It is compatible with major Unix-like operating systems such as macOS, Linux, and BSD and supports both Bash and Zsh shells.

Overall, pyenv simplifies and streamlines Python version management, making it a valuable tool for developers working on projects that require different Python versions or need to switch between interpreters with ease.

List of commands for pyenv:

  • pyenv-virtualenv:tldr:2fe96 pyenv-virtualenv: List all existing virtual environments.
    $ pyenv virtualenvs
    try on your machine
    explain this command
  • pyenv-virtualenv:tldr:84d81 pyenv-virtualenv: Create a new Python 3.6.6 virtual environment.
    $ pyenv virtualenv ${3-6-6} ${virtualenv_name}
    try on your machine
    explain this command
  • pyenv-virtualenv:tldr:b714d pyenv-virtualenv: Activate a virtual environment.
    $ pyenv activate ${virtualenv_name}
    try on your machine
    explain this command
  • pyenv-virtualenv:tldr:b96e3 pyenv-virtualenv: Deactivate the virtual environment.
    $ pyenv deactivate
    try on your machine
    explain this command
  • pyenv:tldr:11b2e pyenv: Set Python version to be used in the current directory and all directories below it.
    $ pyenv local ${2-7-10}
    try on your machine
    explain this command
  • pyenv:tldr:5e05e pyenv: Uninstall a Python version under the `${PYENV_ROOT}/versions` directory.
    $ pyenv uninstall ${2-7-10}
    try on your machine
    explain this command
  • pyenv:tldr:7fedd pyenv: List all Python versions under the `${PYENV_ROOT}/versions` directory.
    $ pyenv versions
    try on your machine
    explain this command
  • pyenv:tldr:81a90 pyenv: List all available commands.
    $ pyenv commands
    try on your machine
    explain this command
  • pyenv:tldr:b18f2 pyenv: Set Python version to be used globally in the current machine.
    $ pyenv global ${2-7-10}
    try on your machine
    explain this command
  • pyenv:tldr:bdb15 pyenv: List all Python versions that can be installed from upstream.
    $ pyenv install --list
    try on your machine
    explain this command
  • pyenv:tldr:c4f0d pyenv: Install a Python version under the `${PYENV_ROOT}/versions` directory.
    $ pyenv install ${2-7-10}
    try on your machine
    explain this command
tool overview