Installing Python dev tools on Linux is a bit of a pain, but it doesn’t have to be. This post will show you how to set up a great Python dev environment on Linux using brew, pipx, and poetry.
brew install python@3.12 python@3.13
Dev tools should be accessable globally, but should’t be in the defualt global python env. Solution - pipx
!/home/bwrob/.local/share/pipx/venvs/poetry/bin/python: This line specifies the interpreter used to run the script. In this case, it’s a Python interpreter located in a specific virtual environment (poetry)
This script acts as a launcher for the poetry command. It sets up the environment and handles potential script extensions before delegating the actual command execution to the poetry library.
We can see that each of the toolos install with pipx is installed in its own venv, but is available globally
ls /home/bwrob/.local/share/pipx/venvs/ -la
Copy your
# Instal dependenciespoetry install# Install pre-commitpre-commit install --install-hooks --overwrite --allow-missing-config# Update pre-commitpre-commit autoupdate# Run pre-commit to test setuppre-commit run --all-files