GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove bundled setuptools · Issue #95299 · python/cpython

Remove bundled setuptools #95299

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove bundled setuptools#95299
Copy link
Labels
3.12only security fixesonly security fixestopic-ensurepiptype-featureA feature request or enhancementA feature request or enhancement

Description

@sbidoul
sbidoul
opened on Jul 26, 2022
Issue body actions

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

  • gh-95299: Stop installing setuptools as a part of ensurepip and venv #101039
  • gh-95299: Rework test_cppext.py to not invoke setup.py directly #103316
  • gh-95299: Remove lingering setuptools reference in installer scripts #103613
Reacted by Zachary Ware, Miro Hrončok, Andrii Oriekhov, Alex Waygood, Jakub Kuczys, Pierre, Ed Morley and Cuong Nguyen Minh Tran Manh

Activity

Next
  1. sbidoul
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jul 26, 2022
  2. sbidoul commented on Jul 26, 2022

    @sbidoul
    sbidoul
    on Jul 26, 2022
    ContributorAuthor
    More actions

    @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.

  3. pablogsal commented on Jul 26, 2022

    @pablogsal
    pablogsal
    on Jul 26, 2022
    Member
    More actions

    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.

    Reacted by Stéphane Bidoul, Jelle Zijlstra, Alex Prengère, Pradyun Gedam, Kamyar Ghanbarpour and Pat Myron
  4. hugovk
    added
    3.12only security fixesonly security fixes
    on Jul 26, 2022
  5. rafrafek commented on Nov 7, 2022

    @rafrafek
    rafrafek
    on Nov 7, 2022
    More actions

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

  6. pradyunsg commented on Jan 14, 2023

    @pradyunsg
    pradyunsg
    on Jan 14, 2023
    Member
    More actions

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

    Reacted by Stéphane Bidoul
  7. pradyunsg
    added
    topic-ensurepip
    on Feb 21, 2023
  8. edmorley commented on Feb 23, 2023

    @edmorley
    edmorley
    on Feb 23, 2023
    More actions

    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? :-)

  9. FFY00 commented on Mar 4, 2023

    @FFY00
    FFY00
    on Mar 4, 2023
    Member
    More actions

    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.

  10. pradyunsg
    added 6 commits that reference this issue on Apr 6, 2023

    pythongh-95299: Rework test_cppext.py to not invoke setup.py directly

    41c5a66

    Revert "pythongh-95299: Rework test_cppext.py to not invoke setup.py …

    d79d6a6

    # This is a combination of 3 commits.

    662900c

    pythongh-95299: Rework test_cppext.py to use explicitly in a tempdir

    02d8a63

    pythongh-95299: Rework test_cppext.py to use explicitly in a tempdir

    846a148

    gh-95299: Rework test_cppext.py to not invoke setup.py directly (#103316

    9e67740
  11. 63 remaining items

  12. commodo
    added a commit that references this issue on Dec 27, 2024

    python3: bump to version 3.13

    14b36b7
  13. ccronca
    added a commit that references this issue on Feb 25, 2025

    fix: Explicitly install setuptools for Python 3.12 compatibility

    9b04a29
  14. josephwkania
    added a commit that references this issue on Apr 16, 2025

    Fix: Add setuptools as a requirement, as it is no longer bundled post…

    f531fca
  15. purajit
    added a commit that references this issue on May 1, 2025

    Include setuptools as a dependency for python>=3.12

    ef5b43a
  16. commodo
    added a commit that references this issue on May 14, 2025

    python3: bump to version 3.13.3

    5a904f9
  17. cclauss
    added a commit that references this issue on Jun 15, 2025

    pip install 'setuptools;python_version >= "3.12"'

    4cc656e
  18. aroon-color
    added a commit that references this issue on Aug 5, 2025

    Include setuptools as a dependency for python>=3.12

    4ae75fa
  19. commodo
    added a commit that references this issue on Aug 18, 2025

    python3: bump to version 3.13.3

    1a8f815
  20. commodo
    added a commit that references this issue on Sep 23, 2025

    python3: bump to version 3.13.7

    2dc2778
  21. neon-smith-tsmmn
    added a commit that references this issue on Sep 27, 2025

    crytic_compile: replace pkg_resources dependency with importlib

    41f8fb4
  22. commodo
    added a commit that references this issue on Oct 31, 2025

    python3: bump to version 3.13.7

    d4fcd20
  23. commodo
    added 3 commits that reference this issue on Nov 7, 2025

    python3: bump to version 3.13.9

    89027d3

    python3: bump to version 3.13.9

    48393da

    python3: bump to version 3.13.9

    9ec6917
  24. hnyman
    added a commit that references this issue on Nov 8, 2025

    python3: bump to version 3.13.9

    97a92f2
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

    3.12only security fixesonly security fixestopic-ensurepiptype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.