Python – Hatch as global python manager

Usage of hatch for pyproject.toml based project.

  • Install Hatch as global python manager:
    • Unix: where python/Pip already there: pip install hatch --break-system-packages
    • Windows: no python at all: msiexec /passive /i https://github.com/pypa/hatch/releases/latest/download/hatxh-x64.msi
  • Set global hatch config
    • To create a .hatch directory in the root of the projects directory: hatch config set dirs.env.virtual .hatch
  • Virtual environment
    • Install environment wit dependencies of pyproject.toml: hatch env create

Leave a Reply

Your email address will not be published. Required fields are marked *