Skip to content

Remove bundled setuptools #95299

Description

@sbidoul

Feature or enhancement

Remove the bundled setuptools so that ensurepip and python -m venv only installs pip.

Context

The setup.py install command of setuptools is deprecated.

However, in an environment where setuptools is installed but wheel is not (such as one created with python -m venv), pip falls back on running the deprecated and non-standard setup.py install.

Since version 22.1 pip works correctly by default in environments where setuptools is not installed, by enabling its PEP 517 mode automatically, leading to unsurprising installations in most cases.

So, in order to progressively expose more users to standard-based installation workflows, we (the pip team) would like that virtual environments are created without setuptools by default.

Users faced with failing installations following this change (likely due to packages with customized setup.py that do not support building a wheel) can easily pip install setuptools to solve the issue.

Previous discussion

pypa/pip#8102 (comment) and following comments has some more context.

Linked PRs

Activity

  1. sbidoul commented on Jul 26, 2022

    @sbidoul
    ContributorAuthor

    @pablogsal do you think it is still acceptable to do this in 3.11? If positive we can likely land a PR on time for RC1.

  2. pablogsal commented on Jul 26, 2022

    @pablogsal
    Member

    Unfortunately I don't feel comfortable landing this so late in the release cycle, specially so close to RC1 and given the current stability of 3.11 :(

    This will need to wait until 3.12.

  3. rafrafek commented on Nov 7, 2022

    @rafrafek

    It feels strange that setuptools is included when using -m venv, but wheel is not included.

  4. pradyunsg commented on Jan 14, 2023

    @pradyunsg
    Member

    I've filed #101039 for this (almost had a number with three 0s), targetting 3.12.

  5. edmorley commented on Feb 23, 2023

    @edmorley

    Since version 22.1 pip works correctly by default in environments where setuptools is not installed, by enabling its PEP 517 mode automatically, leading to unsurprising installations in most cases.

    Do you have some examples of cases where the PEP 517 mode doesn't work for legacy packages? :-)

  6. FFY00 commented on Mar 4, 2023

    @FFY00
    Member

    PEP 517 is backwards compatible, it should work on legacy packages, the opposite is the issue, pip trying to use the legacy path for packages that need PEP 517.

  7. added 6 commits that reference this issue on Apr 6, 2023
  8. 63 remaining items

  9. added a commit that references this issue on Dec 27, 2024
  10. added a commit that references this issue on May 14, 2025
  11. added a commit that references this issue on Aug 18, 2025
  12. added a commit that references this issue on Sep 23, 2025
  13. added a commit that references this issue on Oct 31, 2025
  14. added a commit that references this issue on Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions