pip >= 20.3 ain't happy about cairocffi
after upgrading to pip 20.3 I got the following error seems related to this issue: https://github.com/pypa/pip/issues/9217
...cairocffi-1.2.0.tar.gz (70 kB)
:stderr: WARNING: Generating metadata for package cairocffi produced metadata for project name unknown. Fix your #egg=cairocffi fragments.
ERROR: Requested unknown from http://pypi.org/pypi/web/packages/84/ca/0bffed5116d21251469df200448667e90acaa5131edea869b44a3fbc73d0/cairocffi-1.2.0.tar.gz#sha256=9a979b500c64c8179fec286f337e8fe644eca2f2cd05860ce0b62d25f22ea140 (from -r requirements.txt (line 42)) has different name in metadata: 'UNKNOWN'\n"}
Hi @jesusch! Which command did you use to get this error?
a similar error :
$ pip3 install cairosvg
ERROR: Requested cairocffi from https://files.pythonhosted.org/packages/84/ca/0bffed5116d21251469df200448667e90acaa5131edea869b44a3fbc73d0/cairocffi-1.2.0.tar.gz#sha256=9a979b500c64c8179fec286f337e8fe644eca2f2cd05860ce0b62d25f22ea140 (from cairosvg) has different version in metadata: 'file-.cairocffi-VERSION'
Suggested by https://github.com/pypa/pip/issues/9217#issuecomment-738533535
$ pip3 install --use-deprecated=legacy-resolver cairosvg
Successfully installed cairocffi-file-.cairocffi-VERSION cairosvg-2.5.1 cffi-1.14.4 cssselect2-0.4.1 defusedxml-0.6.0 pillow-8.1.0 pycparser-2.20 tinycss2-1.1.0 webencodings-0.5.1
I’m sorry, but I really can’t reproduce this error, and I’d like to deeply understand what’s wrong before fixing anything.
Here’s what I have:
$ pip --version
pip 20.3.3
$ pip install cairocffi
Collecting cairocffi
Downloading cairocffi-1.2.0.tar.gz (70 kB)
|████████████████████████████████| 70 kB 1.0 MB/s
Requirement already satisfied: cffi>=1.1.0 in ./venv/lib/python3.8/site-packages (from cairocffi) (1.14.4)
Requirement already satisfied: pycparser in ./venv/lib/python3.8/site-packages (from cffi>=1.1.0->cairocffi) (2.20)
Using legacy 'setup.py install' for cairocffi, since package 'wheel' is not installed.
Installing collected packages: cairocffi
Running setup.py install for cairocffi ... done
Successfully installed cairocffi-1.2.0
For me, having cairocffi-file-.cairocffi-VERSION in your logs means that:
- you have a buggy cairocffi in cache (
~/.cache/pipon my computer), and/or - you have an old version of setuptools (39.2.0 is required as far as I can remember).
If it’s not your case, I’d really like to understand what’s going on!