Skip to content
Advertisement

pip has problems with metadata

I’m trying to install the win32core module using pip, but it keeps displaying warnings about the package/wheel metadata not matching with the filename (inconsistent version).

Here’s a snippet of the text displayed in the command prompt before it goes to download older versions:

python -m pip install --no-cache-dir win32core
Collecting win32core
  Downloading win32core-221.28.tar.gz (2.1 MB)
     |████████████████████████████████| 2.1 MB 2.2 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
WARNING: Discarding https://files.pythonhosted.org/packages/24/
0a6e0b2e201c76ccd3cda1f97bd64d45daa2b899b50e541962748ec5bc9f5d/
win32core-221.28.tar.gz#
sha256=e805548ccde99a3f36931d3eef72cfaaa5dace4288393af898c96f92c1fe5f9e (from https://pypi.org/simple/win32core/).
Requested win32core from https://files.pythonhosted.org/packages/
24/0a/6e0b2e201c76ccd3cda1f97bd64d45daa2b899b50e541962748ec5bc9f5d/win32core-221.28.tar.gz#
sha256=e805548ccde99a3f36931d3eef72cfaaa5dace4288393af898c96f92c1fe5f9e
has inconsistent version: filename has '221.28', but metadata has '0.0.0'

As I’ve encountered this before, how should I go about installing the module correctly? (I’m on Python 3.9.1)

Advertisement

Answer

Pip changed rules in the version resolver, it is more strict now.

See discussions :

https://github.com/pypa/pip/issues/9186

https://github.com/pypa/pip/issues/9203

Try using :

python -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver <your_package>
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement