Pyenv
Pythonpyenv
Pythonpyenv
Published:
Table of content
Pyenv
pyenv
is a tool that lets you easily switch between multiple versions of Python. (That is not installed on your system). Includes the tox
library that allows you to run your tests in multiple Python versions.
You can install the
pyenv-virtualenv
plugin to manage virtual environments withpyenv
. Pyenv-virtualenv Github.To create
pyenv virtualenv 3.10-dev <your_pyenv>
. To activatepyenv activate <your_pyenv>
. By default,.venv
folder is created in your HOME directory.
Installing pyenv
# Linux
curl https://pyenv.run | bash
# macOS
brew install pyenv
# Windows
# Check https://github.com/pyenv-win/pyenv-win
Using pyenv
# List supported Python versions
pyenv install --list
# Install a Python version
# The --debug flag will use a debug build of Python which is useful for debugging CPython itself. Such as using gdb.
pyenv install <version>