Skip to content

[BUG] latest setuptools release (60.3.0) broke pip? #3002

@jab

Description

@jab

setuptools version

60.3.0

Python version

Python 3.10 (but also reproduces with other versions)

OS

macOS (but also reproduces in GitHub Actions CI using ubuntu-latest)

Additional environment information

No response

Description

The new version of setuptools that was just released seems to have broken pip? After upgrading to latest setuptools, running pip commands is now failing with an AttributeError.

Expected behavior

Pip continues to work after installing the latest release of setuptools, rather than raising AttributeError.

How to Reproduce

Install the latest release of setuptools (60.3.0), and then run a pip command like pip list.

Output

jab@tsmbp /tmp> python3 -m virtualenv /tmp/venv
created virtual environment CPython3.10.1.final.0-64 in 269ms
  creator CPython3Posix(dest=/private/tmp/venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/jab/Library/Application Support/virtualenv)
    added seed packages: pip==21.3.1, setuptools==59.5.0, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
jab@tsmbp /tmp> . /tmp/venv/bin/activate.fish
(venv) jab@tsmbp /tmp> python -m pip list
Package    Version
---------- -------
pip        21.3.1
setuptools 59.5.0
wheel      0.36.2
(venv) jab@tsmbp /tmp> python -m pip install -U setuptools
Requirement already satisfied: setuptools in ./venv/lib/python3.10/site-packages (59.5.0)
Collecting setuptools
  Using cached setuptools-60.3.0-py3-none-any.whl (953 kB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 59.5.0
    Uninstalling setuptools-59.5.0:
      Successfully uninstalled setuptools-59.5.0
Successfully installed setuptools-60.3.0
(venv) jab@tsmbp /tmp> python -m pip list
/private/tmp/venv/bin/python: Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions