pip install fails: incorrect metadata
See original GitHub issueInstalling deepchem using pip 20.3 results in the following error message:
$ pip install deepchem
Collecting deepchem
Using cached deepchem-2.4.0rc1.dev20201119053907.tar.gz (401 kB)
ERROR: Requested deepchem from https://files.pythonhosted.org/packages/fb/32/087
7d24af313f071d7b2b93765c5759a861b46e603176d21bb339e2013cd/deepchem-2.4.0rc1.dev2
0201119053907.tar.gz#sha256=e886573f12a52fd62a460835629daa4f2236e0a2926ec9766b7f
02c89fc8412b has different version in metadata: '2.4.0rc1.dev20201204104606'
Apparently, there are two slightly different timestamps used in the packaging of a deepchem release for pypi.
This seems to be related to the new resolver used by pip, since using pip version 20.2 this error only occurs if --use-feature=2020-resolver
is used.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
python - Pip cannot find metadata file - EnvironmentError
I have held broken packages so after trying that, I just get a new error that says: Could not install packages due to...
Read more >'METADATA' crash during 'pip install' · Issue #8676 - GitHub
It seems weird that this file cannot be read; this may be an environment issue, not a pip bug (although we should catch...
Read more >Error: metadata-generation-failed. Encountered error while ...
To solve the error "metadata-generation-failed. Encountered error while generating package metadata", make sure your `pip` and `setuptools` ...
Read more >note: this error originates from a subprocess, and is likely not a ...
I fixed the problem by installing an older version of pip using the command: ... a problem with pip. error: metadata-generation-failed × Encountered...
Read more >Changelog - pip documentation v22.3.1
Ignore distributions with invalid Name in metadata instead of crashing, ... Fix pip install issues using a proxy due to an inconsistency in...
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
As @LarsAC mentioned, the workaround is the following command.
The reason why this error happen is that we publish only
tar.gz file
through PyPI, notwheel file
.I understood how
pip install
works from this URL : https://pydist.com/blog/pip-install. When we runpip install some_package
, firstly the PyPI resolver searches awheel file
which is a built-package format. If the resolver don’t find awheel file
, it searches atar.gz file
and build some_package. In the case oftar.gz file
, the resolver need to build the package. (On the other hand, there is no need in the case ofwheel
).Now, DeepChem published only
tar.gz file
, so PyPI resolver finddeepchem-2.4.0rc1.dev20201119053907.tar.gz
(latest package) and build it when runningpip instal --pre deepchem
. But, the package version which is built by PyPI will bedeepchem-2.4.0rc1.dev.build_time
(built_time is the time when installing) based on our versioning logic in setup.py. So, PyPI raise the reported error (version mismatch).I think this issue will be resolved by publishing
wheel file
. Thewheel file
is more appropriate file format when publishing the package. This is because thewheel file
is faster to install without building.I will try to fix in #2294
For use of pip 20.3 I could solve using additional option
--use-deprecated=legacy-resolver
. As per pip documentation, this option will go away in 21.0, though.