Resolving metadata is missing required fields errors in Package Manager

Package Manager
Python
Published

February 20, 2026

Abstract

Metadata-Version errors occur when attempting to build Python source packages from a Git repository in Posit Package Manager versions prior to 2025.04.

Description

This error occurs when adding a Python package to a local or Git source:

error: unable to parse <PATH>, path may not point to a valid Python package: metadata is missing required fields

Prior to version 2025.04, Posit Package Manager only supported Python core Metadata-Version 2.2 and earlier. Packages built with setuptools, poetry-core, or hatchling began producing Metadata-Version 2.3 or 2.4 by default, which caused these errors.

Solution

Upgrade Posit Package Manager to version 2025.04 or later. This version added support for core Metadata-Version 2.3 and 2.4. See the release notes for details.

Workaround for earlier versions

If you cannot upgrade Package Manager, you can work around this issue by pinning your build backend to a version that produces Metadata-Version 2.2 or earlier:

Build backend Pin to version
setuptools 76.1.0
poetry-core 1.9.1
hatchling 1.21.1

For example, with poetry-core:

pyproject.toml
[build-system]
requires = ["poetry-core==1.9.1"]
build-backend = "poetry.core.masonry.api"

After updating pyproject.toml, commit the changes and rebuild the package. Note that older build backend versions may require different pyproject.toml syntax.

If you’re still having issues, you can reach out to Support by opening a ticket.