Skip to content

My Python Development Environment

Install Tools @macOS


This is a from scratch to start a development environment in macOS. I am writing this in macOS Sonoma V14.0

Install oh-my-zsh
sh -c "$(curl -fsSL"
Install brew
/bin/bash -c "$(curl -fsSL"
brew install --cask visual-studio-code
brew install [email protected]
brew install pipx
brew install pyenv
python3 --version
pipx install poetry
pipx install poetry-plugin-export
pipx install poethepoet
pipx inject poetry poethepoet
pipx inject poetry poetry-plugin-export
pipx runpip poetry uninstall <poetry-plugin>

Add VSCode Extensions

code --list-extensions
code --list-extensions | xargs -L 1 echo code --install-extension
code --install-extension <extension-name>
code --install-extension
code --install-extension ms-python.python
code --install-extension ms-python.vscode-pylance

Start a project

Create new project
poetry use <python-version>
poetry new <project-name>
Initialize from existing project
cd <project-directory>
poetry use <python-version>
poetry init

And the rest is in Starting a Python Project