Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JulienPalard opened this issue Oct 29, 2021 · 1 comment
Labels
topic-ensurepip type-feature A feature request or enhancement

Comments

@JulienPalard
Copy link
Member

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 = []

@JulienPalard
Copy link
Member Author

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

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@AlexWaygood AlexWaygood added the type-feature A feature request or enhancement label Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-ensurepip type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants