Setup a Python Development Environment
This is intended as a quick reference for setting up a Python development environment.

This is intended as a quick reference and explanation of how I setup environments to develop via Python on my Mac.
Requirements
- Develop/test on different versions of Python.
- Isolate each project from each other.
Isolate Python versions
pyenv a simple python version management tool that can be installed via homebrew.
Installalation
brew install pyenvList installed python versions
pyenv install --listLoad python versions
pyenv install -v 3.8.2List your loaded python versions
pyenv versionsChange your global python version
pyenv global 3.8.2Set location specific python version
pyenv local 2.7.15Uninstall any version
pyenv uninstall 2.7.15Add to ~/.bash_profile
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fiCreate a virtual environment
pyenv versions
pyenv shell 3.8.2
python -V
python -m venv env
source env/bin/activateLeave virtual environment
deactivate