pipx
https://github.com/pypa/pipx
pipx is made specifically for application installation
blackなど開発全般で使うライブラリは pipx で入れるのがオススメされるらしい
Python処理系の下に直接入れていたが、pipx で分離した環境に入るのがいいということ?
It's closely related to pip. In fact, it uses pip, but is focused on installing and managing Python packages that can be run from the command line directly as applications.
pipx (Homebrew Formulae)
https://pipx.pypa.io/stable/
IMO:2つのwalkthroughがオススメ
pipxコマンドの実装はmain.pyのcli関数
ref: https://github.com/pypa/pipx/blob/1.5.0/pyproject.toml#L49
cli関数 https://github.com/pypa/pipx/blob/1.5.0/src/pipx/main.py#L978
run_pipx_command https://github.com/pypa/pipx/blob/1.5.0/src/pipx/main.py#L177