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:
JavaScript
x
16
16
1
python -m pip install --no-cache-dir win32core
2
Collecting win32core
3
Downloading win32core-221.28.tar.gz (2.1 MB)
4
|████████████████████████████████| 2.1 MB 2.2 MB/s
5
Installing build dependencies done
6
Getting requirements to build wheel done
7
Preparing wheel metadata done
8
WARNING: Discarding https://files.pythonhosted.org/packages/24/
9
0a6e0b2e201c76ccd3cda1f97bd64d45daa2b899b50e541962748ec5bc9f5d/
10
win32core-221.28.tar.gz#
11
sha256=e805548ccde99a3f36931d3eef72cfaaa5dace4288393af898c96f92c1fe5f9e (from https://pypi.org/simple/win32core/).
12
Requested win32core from https://files.pythonhosted.org/packages/
13
24/0a/6e0b2e201c76ccd3cda1f97bd64d45daa2b899b50e541962748ec5bc9f5d/win32core-221.28.tar.gz#
14
sha256=e805548ccde99a3f36931d3eef72cfaaa5dace4288393af898c96f92c1fe5f9e
15
has inconsistent version: filename has '221.28', but metadata has '0.0.0'
16
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 :
JavaScript
1
2
1
python -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver <your_package>
2