Install XCode commandline tools
$ ./install_dev_tools.sh
Install homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Check if brew is in path
$ which brew
Install pyenv
$ brew install pyenv
Install python 3.9.7
$ pyenv install 3.9.7
Check if 3.9.7 exists
$ pyenv versions
Configure shell to use this new python
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
$ echo 'eval "$(pyenv init --path)"' >> ~/.profile
$ echo 'if [ -n "$PS1" -a -n "$BASH_VERSION" ]; then source ~/.bashrc; fi' >> ~/.profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bashrc
Now open up a new shell so that the entries in ~/.bashrc
take effect. From that new terminal...
Install pipenv
$ pip install pipenv
Have pipenv create a new virtualenv for the project
pipenv shell
Now install all the project's dependencies defined in Pipfile (and Pipfile.lock)
pipenv install