Why does pip freeze list "pkg-resources==0.0.0"? Why does pip freeze list "pkg-resources==0.0.0"? python python

Why does pip freeze list "pkg-resources==0.0.0"?


According to https://github.com/pypa/pip/issues/4022, this is a bug resulting from Ubuntu providing incorrect metadata to pip. So, no there does not seem to be a good reason for this behaviour. I filed a follow-up bug with Ubuntu. https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463


I had the same problem in my virtual environment. I removed it with pip uninstall pkg-resources==0.0.0


As mentioned in other answer this is a bug. However, on linux you can use the following command to automatically remove the line containing pkg-resources==0.0.0.

$ pip freeze > requirements.in && grep -v "pkg-resources==0.0.0" requirements.in > temp && mv temp requirements.in