Comment 17 for bug 1635463

Revision history for this message
B AG (bayersglassey-zesty) wrote :

I notice earlier in this issue, people were mentioning "pkg-resources==0.0.0", whereas I'm seeing "pkg_resources==0.0.0". That's interesting.

Also, this "pkg_resources==0.0.0" seems to show up specifically when installing a *different version* of pip -- not necessarily the *latest* version. Here we see that it doesn't show up when installing new versions of setuptools or wheel, but it does show up when installing an old version of pip:

$ python3 -m venv temp_env && . temp_env/bin/activate
(temp_env) $ pip install -U setuptools
Collecting setuptools
  Using cached setuptools-62.1.0-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 44.0.0
    Uninstalling setuptools-44.0.0:
      Successfully uninstalled setuptools-44.0.0
 Successfully installed setuptools-62.1.0
(temp_env) $ pip freeze
(temp_env) $ pip install -U wheel
Collecting wheel
  Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.37.1
(temp_env) $ pip freeze
(temp_env) $ pip install pip==9.0.3
Collecting pip==9.0.3
  Using cached pip-9.0.3-py2.py3-none-any.whl (1.4 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-9.0.3
(temp_env) $ pip freeze
pkg-resources==0.0.0
You are using pip version 9.0.3, however version 22.0.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

^ Only the very last `pip freeze` outputs "pkg-resources==0.0.0".
Also, uninstalling pkg_resources seems to permanently fix the issue:

$ pip install -U pip
Collecting pip
  Using cached pip-22.0.4-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
pipSuccessfully installed pip-22.0.4
(temp_env) $ pip freeze
pkg_resources==0.0.0
(temp_env) $ pip uninstall pkg_resources
Found existing installation: pkg_resources 0.0.0
Uninstalling pkg_resources-0.0.0:
  Would remove:
    /home/zesty_bag/repos/zestyai/data-ingestion/temp_env/lib/python3.8/site-packages/pkg_resources-0.0.0.dist-info/*
    /home/zesty_bag/repos/zestyai/data-ingestion/temp_env/lib/python3.8/site-packages/pkg_resources/*
Proceed (Y/n)? Y
  Successfully uninstalled pkg_resources-0.0.0
(temp_env) $ pip install pip~=20.0
Collecting pip~=20.0
  Using cached pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.4
    Uninstalling pip-22.0.4:
      Successfully uninstalled pip-22.0.4
Successfully installed pip-20.3.4
(temp_env) $ pip freeze
(temp_env) $ pip install -U pip
Requirement already satisfied: pip in ./temp_env/lib/python3.8/site-packages (20.3.4)
Collecting pip
  Using cached pip-22.0.4-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.3.4
    Uninstalling pip-20.3.4:
      Successfully uninstalled pip-20.3.4
Successfully installed pip-22.0.4
(temp_env) $ pip freeze

^ So, after uninstalling pkg_resources, an installation of a different version of pip no longer causes "pkg_resources==0.0.0" to appear.