python / python/cpython

venv python reports wrong sys.executable in a subprocess on Windows

Open
#83,086 33 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OS-windows stdlib topic-venv
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

BPO 38905
Nosy @pfmoore, @ericvsmith, @tjguk, @zware, @eryksun, @zooba, @uranusjr, @nsmcan, @nirvana-msu

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 2019-11-24.08:17:40.212>
labels = ['3.10', 'OS-windows']
title = 'venv python reports wrong sys.executable in a subprocess on Windows'
updated_at = <Date 2021-03-29.22:53:56.136>
user = 'https://github.com/uranusjr'

bugs.python.org fields:

activity = <Date 2021-03-29.22:53:56.136>
actor = 'steve.dower'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Windows']
creation = <Date 2019-11-24.08:17:40.212>
creator = 'uranusjr'
dependencies = []
files = []
hgrepos = []
issue_num = 38905
keywords = []
message_count = 30.0
messages = ['357392', '357393', '357394', '357421', '357425', '357428', '357429', '357430', '357437', '357439', '357440', '357453', '357456', '357457', '357459', '357460', '357479', '357519', '366755', '366824', '370656', '371357', '378284', '385923', '389321', '389345', '389741', '389760', '389761', '389768']
nosy_count = 12.0
nosy_names = ['paul.moore', 'eric.smith', 'tim.golden', 'Jurko.Gospodneti\xc4\x87', 'zach.ware', 'eryksun', 'steve.dower', 'uranusjr', 'Benedek R\xc3\xa1cz', 'nsmcan', 'nirvana-msu', 'awaizman']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue38905'
versions = ['Python 3.10']

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked BPO issue 38905 and its discussion, then reproduce the behavior involving venv, subprocesses, and sys.executable on Windows. Done means a subprocess launched from a virtual environment reports the correct virtual-environment interpreter path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.