PYENV
Pyenv commands
Published in
1 min readJan 22, 2019
Install Python versions
$ pyenv install [version_number]
View all the installed versions
$ pyenv versions
Switch versions globally
# List the current global python version
$ pyenv global# Switch to the specified version
$ pyenv global [version_number or virtual_env_name]
Create a virtual environment based on a specified python version
$ pyenv virtualenv [specified_version] [virtual_env_name]
Switch versions locally
# Go to the specified project directory
$ cd [project_directory]# Set a local python version
$ pyenv local [version_number or virtual_env_name]