Hatchling is a modern, extensible Python build backend used by Hatch, currently at version 1.29.0, released on February 23, 2026. It follows a regular release cadence, with updates approximately every 50 days.
pip install hatchlingVerified import paths — ran on the pinned version, not inferred.
A basic example of implementing a custom build hook using Hatchling's BuildHookInterface.
Upgrade to Python 3.10 or later.
Install 'virtualenv' using 'pip install virtualenv'.
Ensure `hatchling` is installed in your current virtual environment by running: `pip install hatchling`. If using Hatch, ensure it's installed and the environment is activated, or try `hatch env prune` followed by `hatch env restore`.
Upgrade `hatchling` to its latest version (`pip install --upgrade hatchling`) and ensure your build tools (e.g., `pip`) are also up-to-date. If the issue persists, review `hatchling`'s release notes for breaking changes related to editable installs and adjust your `pyproject.toml` or workflow accordingly.
Check your `pyproject.toml` for syntax errors, ensure all declared files (e.g., `readme`) exist and are UTF-8 encoded, verify that Python packages have an `__init__.py` file, and inspect any custom build hooks for errors. The full traceback accompanying this error message will provide more specific details.
To allow direct references in your dependencies, add the following to your `pyproject.toml` under the `[tool.hatch.metadata]` section: `allow-direct-references = true`.