pip 24.1 (June 2024) stopped tolerating invalid package metadata. Versions and dependency specifiers that do not conform to PEP 440 are now an error rather than a warning, so a release that installed fine under pip 24.0 can fail with Requested package has invalid metadata or Ignoring version of package because it has invalid metadata.
The common triggers are old sdists on PyPI with a version like 1.0-beta instead of 1.0b0, or a dependency written as foo (>=1.0,) with a trailing comma. Nothing about the package changed; pip's tolerance did. Because these are old artefacts, the failure typically shows up when a transitive pin drags in a release from years ago.
Diagnose by re-running with pip install -v, which names the offending distribution and the metadata field. The fixes, in order of preference, are to upgrade the dependency to a release with valid metadata, pin around the bad version, or as a last resort build a corrected wheel yourself and serve it from a private index. Downgrading pip is not a fix because the same check exists in every newer release.