Inconsistent version: filename has '2.2.0', but metadata has '0.0.0'
See original GitHub issueGetting 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:
- Created a year ago
- Comments:9 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks @orsinium that would be really appreciated!
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.