Carefully follow these READMEs:
- To install pyenv + python: https://github.com/pyenv/pyenv
- To install pyenv-virtualenv: https://github.com/pyenv/pyenv-virtualenv
These are the commands I used on MacOS with ZSH:
brew update
brew install pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc\
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc\
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
exec "$SHELL"
brew install openssl readline sqlite3 xz zlib tcl-tk
pyenv install 3.11.4
pyenv global 3.11.4
brew install pyenv-virtualenv
pyenv virtualenv 3.11.4 nba-data-scrapping-3.11.4
echo "nba-data-scrapping-3.11.4" >> .python-version
exec "$SHELL"