Skip to content

Better error message on failing to create a venv due to failing ensurepip #89830

Description

@JulienPalard
BPO 45667
Nosy @JulienPalard

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-10-29.10:00:06.597>
labels = []
title = 'Better error message on failing to create a venv due to failing ensurepip'
updated_at = <Date 2021-10-29.10:00:06.597>
user = 'https://github.com/JulienPalard'

bugs.python.org fields:

activity = <Date 2021-10-29.10:00:06.597>
actor = 'mdk'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2021-10-29.10:00:06.597>
creator = 'mdk'
dependencies = []
files = []
hgrepos = []
issue_num = 45667
keywords = []
message_count = 1.0
messages = ['405297']
nosy_count = 1.0
nosy_names = ['mdk']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue45667'
versions = []

Linked PRs

Activity

  1. JulienPalard commented on Oct 29, 2021

    @JulienPalard
    MemberAuthor

    Currently if ensurepip fails for a reason or another, for example if a wrong module gets imported:

    $ touch http.py
    $ python3.10 -m venv .venv
    Error: Command '['/tmp/.venv/bin/python3.10', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

    the error is not helpfull. Maybe venv should just dump the stderr from ensurepip so we can learn a bit more about it (it's « understandable » in ensurepip traceback that it's in relation with http.py, in the given example.)

  2. transferred this issue fromon Apr 10, 2022
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Aug 10, 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

    stdlibStandard Library Python modules in the Lib/ directorytopic-ensurepiptopic-venvRelated to the venv moduletype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions