question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent version: filename has '2.2.0', but metadata has '0.0.0'

See original GitHub issue

Getting these errors when attempting to build a Docker container that has nats-py==2.2.0 in the requirements.txt:

WARNING: Requested nats-py==2.2.0 from https://files.pythonhosted.org/packages/21/00/831ef555466bcde9419fc953ded17cb83e255733b248bf0e72a0a11759b6/nats-py-2.2.0.tar.gz (from -r /opt/tmp/requirements.txt (line 5)), but installing version 0.0.0
Discarding https://files.pythonhosted.org/packages/21/00/831ef555466bcde9419fc953ded17cb83e255733b248bf0e72a0a11759b6/nats-py-2.2.0.tar.gz (from https://pypi.org/simple/nats-py/) (requires-python:>=3.7): Requested nats-py==2.2.0 from https://files.pythonhosted.org/packages/21/00/831ef555466bcde9419fc953ded17cb83e255733b248bf0e72a0a11759b6/nats-py-2.2.0.tar.gz (from -r /opt/tmp/requirements.txt (line 5)) has inconsistent version: filename has '2.2.0', but metadata has '0.0.0'

I do not get any errors if I use nats-py==2.1.7 instead. But I would actually like to use the new API. Maybe something went wrong when the 2.2.0 package was built? The Meta section on https://pypi.org/project/nats-py/ also does not look right to me.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wallyqscommented, Nov 23, 2022

thanks @orsinium that would be really appreciated!

0reactions
orsiniumcommented, Nov 22, 2022

That’s because nats.py releases don’t include wheel releases but they should. To install a package from tarball, pip executes setup.py which doesn’t have a version specified, this is why it defaults to 0.0.0. And pip is able to produce the warning because the correct version for the package is specified in egg-info inside of the distribution, and so pip can compare distributed and generated egg-info after the installation.

@wallyqs I can fix and automate packaging for nats.py if you want, with a bit of flit and Taskfile. It’s in my blood.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - pip has problems with metadata - Stack Overflow
has inconsistent version : filename has '22.1.2', but metadata has '22.1.2' and pip goes into a download loop trying older and older versions...
Read more >
inconsistent version for every package · Issue #10929 · pypa/pip
Running python -m pip install <any package> results in pip trying to downgrade versions until it runs out of them, thinking the metadata...
Read more >
Cannot install packages with pip - error with inconsistent ...
I recently have an issue trying to install anything with pip. ... has inconsistent version: filename has '22.0.4', but metadata has '22.0.4' ...
Read more >
Cant install module via Pip | TelstraDev
I've had the same issue, the problem is that the package on PyPI has mismatching metadata, and recent versions of pip will complain...
Read more >
Changelog - pip documentation v22.3.1
New resolver: Error message shown when a wheel contains inconsistent metadata is made more helpful by including both values from the file name...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found