Setup Python and Poetry
Install pyenv to manage Python installation.
Please note, do not try to use System Python as the default system.
Install
pyenv :brew install pyenvInstall Python:
pyenv install 3.9.10Add the following to your
~/.bash_profile or ~/.zshrc:export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/shims:$PATH"In order to access a remote repository make sure to update this file
$HOME/.pip/pip.conf vi $HOME/.pip/pip.confadd your config:
[global]
index-url = "<REMOTE REPOSITORY>"Configuring pipx:
Install pipx using brew:
brew install pipx
pipx ensurepath Installing Poetry:
Run the following to determine number of python versions.
pyenv versionsSingle Python Installation:
pipx install poetry
poetry --versionMultiple Python Installations:
pyenv global <PYTHON VERSION>
pipx install poetry --python $(which python)
poetry env use $(which python)
poetry --versionUpgrade Poetry:
pipx upgrade poetry