PyEnv Tips
Python dependancy hell is curbed by the advent of pyenv. Here is a short list of pyenv commands that are useful to me on a daily basis.
Version Management
View versions
pyenv versions
Install a version
pyenv install 3.7.3
Set a global/local version
pyenv [global/local] 3.7.3
Spawn Shell with Given Version
pyenv shell 3.7.3
Uninstall a Version
pyenv uninstall 3.7.3
Environment Management
List Virtualenvs
pyenv virtualenvs
Create a New Virtualenv
pyenv virtualenv 3.7.3 my-virtualenv-3.7.3
Remove a Virtualenv
pyenv uninstall my-virtualenv-3.7.3
(Conda) Activate a Virtualenv
Although pyenv-virtualenv is supposed to play nicely with conda, I’ve found it easier to use conda create as usual.
pyenv activate my-conda-env-5.2