This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: pyvenv should display a progress indicator while creating an environment
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.5
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, ncoghlan, steve.dower, vinay.sajip, vstinner
Priority: normal Keywords:

Created on 2014-08-23 09:12 by ncoghlan, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (9)
msg225737 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-08-23 09:12
Creating an environment with pyvenv or "python -m venv" in 3.4+ can be a bit disconcerting, as it may take some time (especially on older machines).

It would be good if the command line utility displayed some kind of marking while this operation was in progress.

(The delay seems to be mostly due to ensurepip - running "./python -m venv --without-pip" under my 3.4 checkout is relatively fast, at least on my system)
msg225740 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2014-08-23 10:47
Should this be a change to ensurepip, then, or a change in pyvenv? My original script at

shows progress information as the subprocess runs. However, it somewhat depends on the verbosity of the underlying child process to relay meaningful progress.
msg225741 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-08-23 10:57
I'm not actually sure - it only occurred to me while filing the issue that ensurepip was the likely culprit.

Donald, what do you think? Is virtualenv chattier here?
msg230039 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2014-10-26 20:43
virtualenv is definitely chattier - it prints out the path where the env will be and when it is installing setuptools and pip.

That's all that's really needed here too, IMHO - just enough to let users know that venv has heard them and is doing something (not just waiting for Python to start up).
msg230061 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2014-10-27 06:55
It looks as if ensurepip is where changes should happen. The venv code just makes a subprocess.check_output() call to ensurepip, and anything that ensurepip outputs would be displayed on the console.
msg233352 - (view) Author: Donald Stufft (dstufft) * (Python committer) Date: 2015-01-03 11:00
I just noticed this issue. I think all that really needs done here is changing the venv module to use subprocess.check_call instead of subprocess.check_output when calling ensurepip.
msg233400 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2015-01-04 08:06
I have a vague recollection of originally using check_call, and then switching to check_output. However, that may have just been for testing related reasons, which could be better handled in the test suite, allowing users to see the pip installation output as a progress indicator.

If we add the extra output, adding a -q/--quiet option at the same time would be a good idea.
msg376849 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2020-09-13 20:50
Can we close this? I guess this enhancement is no longer needed.
msg376875 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-09-14 10:02
I close the issue.

If someone wants to work on venv, I suggest to attempt to copy virtualenv cache optimization of virtualenv 20, to speedup the creation of a venv, rather than adding a progress bar :-)
Date User Action Args
2022-04-11 14:58:07adminsetgithub: 66452
2020-09-14 10:02:19vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg376875

stage: needs patch -> resolved
2020-09-13 20:50:15vinay.sajipsetmessages: + msg376849
2015-01-04 08:06:31ncoghlansetmessages: + msg233400
2015-01-03 11:00:26dstufftsetmessages: + msg233352
2014-10-27 14:34:00vstinnersetnosy: + vstinner
2014-10-27 06:55:53vinay.sajipsetmessages: + msg230061
2014-10-26 20:43:01steve.dowersetnosy: + steve.dower
messages: + msg230039
2014-08-23 10:57:54ncoghlansetmessages: + msg225741
2014-08-23 10:47:47vinay.sajipsetmessages: + msg225740
2014-08-23 09:12:01ncoghlancreate