latest pypi release shows wrong version on `pip freeze`
See original GitHub issuesee 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)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:25 (14 by maintainers)
Top Results From Across the Web
pip freeze gives different version from pip --version
I installed virtualenv using pip install virtualenv, and i got the message that i installed 16.7. 2 while 19.2. 1 is available. I...
Read more >Changelog - pip documentation v22.3.1
Switch to releasing a new, non-bug fix version of pip every 3 months. Deprecations and Removals#. Remove the legacy format from pip list....
Read more >Stop using “pip freeze” for your Python projects
Now say, the owner of library A releases a new version which uses a different version of library B and removes library C....
Read more >Ask HN: Why Poetry did not become a mainstream package ...
My pip freeze lock file will still keep me on foo v1 and bar v1, even though foo has unpinned dependency on bar...
Read more >`$ pip freeze > requirements.txt` considered harmful - Medium
txt file at different time, those sub-dependencies may have been updated, resulting in a different final set of packages between the two persons ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In case anyone ends up here like I did, there’s some awful pip behavior on display.
If you install
cairocffi
with a version ofsetuptools
that’s too old, pip will buildcairocffi
with 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/pip
fixed 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.