我正在尝试安装 win32core
使用 pip 的模块,但它一直显示有关包/轮元数据与文件名不匹配的警告(版本不一致)。
这是下载旧版本之前命令提示符中显示的文本片段:
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'
正如我之前遇到的那样,我应该如何正确安装模块? (我在 Python 3.9.1 上)
最佳答案
Pip 在版本解析器中更改了规则,现在更严格了。
查看讨论:
https://github.com/pypa/pip/issues/9186
https://github.com/pypa/pip/issues/9203
尝试使用:
python -m pip install --upgrade --no-cache-dir --use-deprecated=legacy-resolver <your_package>
关于python - pip 元数据有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67074684/