Skip to content

Installation


GitHub Actions

- name: Install Hatch
  uses: pypa/hatch@install

Refer to the official action for more information.

Installers

  1. In your browser, download the .pkg file: hatch-universal.pkg
  2. Run your downloaded file and follow the on-screen instructions.
  3. Restart your terminal.
  4. To verify that the shell can find and run the hatch command in your PATH, use the following command.

    $ hatch --version
    1.13.0
    
  1. Download the file using the curl command. The -o option specifies the file name that the downloaded package is written to. In this example, the file is written to hatch-universal.pkg in the current directory.

    curl -Lo hatch-universal.pkg https://github.com/pypa/hatch/releases/latest/download/hatch-universal.pkg
    
  2. Run the standard macOS installer program, specifying the downloaded .pkg file as the source. Use the -pkg parameter to specify the name of the package to install, and the -target / parameter for the drive in which to install the package. The files are installed to /usr/local/hatch, and an entry is created at /etc/paths.d/hatch that instructs shells to add the /usr/local/hatch directory to. You must include sudo on the command to grant write permissions to those folders.

    sudo installer -pkg ./hatch-universal.pkg -target /
    
  3. Restart your terminal.

  4. To verify that the shell can find and run the hatch command in your PATH, use the following command.

    $ hatch --version
    1.13.0
    
  1. In your browser, download one the .msi files:
  2. Run your downloaded file and follow the on-screen instructions.
  3. Restart your terminal.
  4. To verify that the shell can find and run the hatch command in your PATH, use the following command.

    $ hatch --version
    1.13.0
    
  1. Download and run the installer using the standard Windows msiexec program, specifying one of the .msi files as the source. Use the /passive and /i parameters to request an unattended, normal installation.

    msiexec /passive /i https://github.com/pypa/hatch/releases/latest/download/hatch-x64.msi
    
    msiexec /passive /i https://github.com/pypa/hatch/releases/latest/download/hatch-x86.msi
    
  2. Restart your terminal.

  3. To verify that the shell can find and run the hatch command in your PATH, use the following command.

    $ hatch --version
    1.13.0
    

Standalone binaries

After downloading the archive corresponding to your platform and architecture, extract the binary to a directory that is on your PATH and rename to hatch.

pip

Hatch is available on PyPI and can be installed with pip.

pip install hatch

Warning

This method modifies the Python environment in which you choose to install. Consider instead using pipx to avoid dependency conflicts.

pipx

pipx allows for the global installation of Python applications in isolated environments.

pipx install hatch

Homebrew

See the formula for more details.

brew install hatch

Conda

See the feedstock for more details.

conda install -c conda-forge hatch

or with mamba:

mamba install hatch

Warning

This method modifies the Conda environment in which you choose to install. Consider instead using pipx or condax to avoid dependency conflicts.

MacPorts

See the port for more details.

sudo port install hatch

Fedora

The minimum supported version is 37, currently in development as Rawhide.

sudo dnf install hatch

Void Linux

xbps-install hatch

Build system availability

Hatchling is Hatch's build backend which you will never need to install manually. See its changelog for version information.

Packaging status