# Helpful Commands 1. [pyenv](#Pyenv) ## Pyenv #### Install a version of python ``` pyenv install {PYTHON_VERSION_NUMBER} ``` #### Create a new virtual environment based on a version of python ``` pyenv virtualenv {PYTHON_VERION_NUMBER} {ENV_NAME} ``` #### Associate the current directory with a specific virtual environment ``` pyenv local {ENV_NAME} ``` #### Remove current directory associated virtual environment ``` pyenv local --unset ``` #### Activate a virtual environment ``` pyenv activate {ENV_NAME} ``` #### Deactivate a virtual environment ``` pyenv deactivate ``` #### List all virtual environments ``` pyenv versions | grep "\-\->" | awk -F"-->" '{print $1}' ``` Or the alias I have created for you" ``` venvs ``` #### How to be certain you are in the correct venv You can either `echo $VIRTUAL_ENV` which should print out the current environment or you can check that `pip freeze` is correct. `python --version` may be helpful as well but I am not sure.