Title: pyvenv should be installed someplace more obvious on Windows
Type: enhancement Stage:
Components: Windows Versions: Python 3.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, jason.coombs, jkloth, michael.foord, piotr.dobrogost, steve.dower, tim.golden, zach.ware
Priority: low Keywords:

Created on 2013-03-19 17:29 by jason.coombs, last changed 2014-07-16 19:46 by zach.ware.

Messages (8)
msg184645 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2013-03-19 17:29
On Windows, is installed to PythonNN\Tools\Scripts, which I would generally recommend not be added to the system's or user's PATH.

It would be nice if there were a Windows-friendly launcher that's available similar to what's available on Unix. For example, on Unix, a script is created in /usr/bin/pyvenv-3.3 for Python 3.3 environments.

Perhaps Windows installs should include (alongside Python.exe) a pyvenv.exe that invokes venv for the Python environment in which it's executed. Then, if that Python.exe appears in the path, then invoking 'pyvenv' would be invoked for that Python. That approach would better fit my expectations.

Note, though, that one can always use 'py' to invoke venv as so:

py -3 -m venv

However, this mode of invocation is slightly clumsy and probably quite incongruent with the Unix style invocation (complicating a documentation author's "how to" for installing envs).
msg184647 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2013-03-19 17:33
PythonNN\Scripts is the "normal" place for Python command line tools to be installed to. Does the installer not put this on the PATH for windows?
msg184689 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2013-03-19 22:01
The installers don't put anything on PATH by default. Activestate installers and my custom installers do put PythonNN and PythonNN\Scripts on the path.

It's true that PythonNN\Scripts is the place that third-party command-line tools are installed. I don't believe Python itself installs anything there. However, py.exe is installed in C:\Windows and python.exe is installed in PythonNN.

So, to be consistent with the installation of py.exe, pyvenv should be installed in C:\Windows. That would not work well because pyvenv should be specific to a particular Python version.

That's why I suggested the PythonNN directory, because it's part of the core Python installation, where python.exe is installed, and isn't a third-party script. That said, PythonNN\Scripts also seems like it might be a good location. It would necessitate adding that to the PATH, which is a reasonable thing to do. The only case where that wouldn't work is if someone wanted to have pyvenv in the path but not the third-party scripts installed to PythonNN\Scripts.
msg186959 - (view) Author: Piotr Dobrogost (piotr.dobrogost) Date: 2013-04-14 22:05
I've just stumbled upon this issue after asking "Where is pyvenv script in Python 3 on Windows installed?" question at

"Perhaps Windows installs should include (alongside Python.exe) a pyvenv.exe that invokes venv for the Python environment in which it's executed."

I think it's the right thing to do.
msg222959 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-13 17:56
Any thoughts from our Windows gurus?
msg223033 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2014-07-14 15:29
Automatically quoting arguments is more complicated than simply concatenating quotes, unfortunately, and people are guaranteed to have come up with ways to make it work already.

My vote is for leaving this alone and letting the higher level functions be more clever. Changing this function is certain to break existing code in unpredictable ways.
msg223035 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2014-07-14 15:31
That last message should have been on #20451 :)

My thoughts on pyvenv are that it should be in Scripts\ if anywhere, but I'm not desperate to have it on PATH. I would rather not start putting more files alongside python.exe.
msg223262 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-07-16 19:46
I think a pyvenv.exe would be overkill, but I think it would be reasonable to install the pyvenv script to <install_dir>\Scripts rather than <install_dir>\Tools\Scripts, possibly as both '' and ''.  Personally, I still prefer 'py -3 -m venv', but I understand the argument that that's not enough.
Date User Action Args
2014-07-16 19:46:42zach.waresetmessages: + msg223262
2014-07-14 15:31:08steve.dowersetmessages: + msg223035
2014-07-14 15:29:54steve.dowersetmessages: + msg223033
2014-07-13 17:56:43BreamoreBoysetversions: + Python 3.5, - Python 3.3
nosy: + BreamoreBoy, tim.golden, steve.dower, zach.ware

messages: + msg222959

type: enhancement
2013-04-14 22:05:33piotr.dobrogostsetnosy: + piotr.dobrogost
messages: + msg186959
2013-03-19 22:01:06jason.coombssetmessages: + msg184689
2013-03-19 18:10:29jklothsetnosy: + jkloth
2013-03-19 17:33:46michael.foordsetnosy: + michael.foord
messages: + msg184647
2013-03-19 17:29:30jason.coombscreate