cairocffi: latest pypi release shows wrong version on `pip freeze`
see below for my installation process on ubuntu 18.10. pip freeze gives me cairocffi===file-.cairocffi-VERSION.
tuky@Quiet:/tmp$ python3.6 -m venv /tmp/cairoenv
tuky@Quiet:/tmp$ source /tmp/cairoenv/bin/activate
(cairoenv) tuky@Quiet:/tmp$ pip install -U pip
Cache entry deserialization failed, entry ignored
Collecting pip
Using cached https://files.pythonhosted.org/packages/d7/41/34dd96bd33958e52cb4da2f1bf0818e396514fd4f4725a79199564cd0c20/pip-19.0.2-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-19.0.2
(cairoenv) tuky@Quiet:/tmp$ pip install -U wheel
Collecting wheel
Using cached https://files.pythonhosted.org/packages/7c/d7/20bd3c501f53fdb0b7387e75c03bd1fce748a1c3dd342fc53744e28e3de1/wheel-0.33.0-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.33.0
(cairoenv) tuky@Quiet:/tmp$ pip install -U cairocffi
Collecting cairocffi
Using cached https://files.pythonhosted.org/packages/3e/f1/0d1dad825f6ec75d3d79d5673e7b836e7a23bf57fde0028fb8bf252d4259/cairocffi-1.0.1.tar.gz
Collecting cffi>=1.1.0 (from cairocffi)
Using cached https://files.pythonhosted.org/packages/6d/c0/47db8f624f3e4e2f3f27be03a93379d1ba16a1450a7b1aacfa0366e2c0dd/cffi-1.11.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting pycparser (from cffi>=1.1.0->cairocffi)
Building wheels for collected packages: cairocffi
Building wheel for cairocffi (setup.py) ... done
Stored in directory: /home/tuky/.cache/pip/wheels/8d/f0/05/cb8797e3c39d8475b89381d5ac3e3f6d26484ca317abc0c2ce
Successfully built cairocffi
Installing collected packages: pycparser, cffi, cairocffi
Successfully installed cairocffi-file-.cairocffi-VERSION cffi-1.11.5 pycparser-2.19
(cairoenv) tuky@Quiet:/tmp$ pip freeze
cairocffi===file-.cairocffi-VERSION
cffi==1.11.5
pkg-resources==0.0.0
pycparser==2.19
(cairoenv) tuky@Quiet:/tmp$ python --version
Python 3.6.7
(cairoenv) tuky@Quiet:/tmp$ pip --version
pip 19.0.2 from /tmp/cairoenv/lib/python3.6/site-packages/pip (python 3.6)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 25 (14 by maintainers)
In case anyone ends up here like I did, there’s some awful pip behavior on display.
If you install
cairocffiwith a version ofsetuptoolsthat’s too old, pip will buildcairocffiwith that old setuptools, producing a broken build with this nonsense version number, and then it will upgrade setuptools because it knows cairocffi doesn’t work with the old one. But you’ll still have the broken build.And it’s actually even worse: if you uninstall and reinstall cairocffi with the upgraded setuptools, you’ll still get the broken build because pip cached it. For me, doing
rm -rf ~/.cache/pipfixed that.This issue caused Weasyprint to not install for me citing that it needed a version of cairocffi >= 0.9.0. For the time being I fixed the issue by specifying the version for cairocffi to be 1.0.0 in requirements.txt.