[Python-Dev] New Windows installer for Python 3.5

Paul Moore p.f.moore at gmail.com
Mon Jan 5 09:13:41 CET 2015


On 4 January 2015 at 22:56, Steve Dower <Steve.Dower at microsoft.com> wrote:
>> Also, what happens now with setting PATH? Is Python (and the scripts
>> directory) added to PATH by default? If so, what happens when you
>> install 2 versions of Python?
>
> Yes, and in general the later installed version will win and system-wide installs always beat per-user installs. As I mentioned above, using py.exe with a parameter or shebang line is the most reliable way to get the version you want.

Hmm, that's unfortunate. Normally I leave "Add to PATH" off for all
but one installation. I certainly don''t want all versions on there -
I've had too many issues with running something like py.test and
finding it's running Python 3.3 because I didn't install it into
Python 3.4.

I'm pretty sure we'll get bug reports "I installed Python 3.5.1 but
I'm still getting Python 3.5" from the per-user behaviour. And saying
"don't do that" isn't a fix, nor is blaming Microsoft, really.
Unfortunately, I don't see a good solution here.

>> Also, how does the launcher py.exe fit into the picture? Is it still
>> installed into the Windows directory? What about for a user install?
>> Are Python scripts associated with the launcher, and if so, how does
>> it pick up the version you selected as default?
>
> py.exe is more important than ever. It's still installed into the Windows directory for all-user installs, and into the Python directory for just-for-me. It's installed in a way that will make upgrades more reliable (so if you install 3.6 and then 3.5, you'll keep the newer launcher) and all the file associations go straight to the launcher.

The biggest problem here is that py.exe doesn't help in the slightest
with script wrappers like pip.exe, virtualenv.exe, py.test.exe,
ipython.exe ... I've actually drifted away from using py.exe because
of this. Having just the interpreter special cased isn't really good
enough. (I know there's py -m pip, but it's not easy to get people to
use this...)

I think it's really important to only have one Python on your PATH, so
just dumping everything there by default, particularly if user
installs get pushed to the end and don't have precedence, is a bad
experience.

> The default Python for the launcher seems to be 2.7 if it's there and the latest version if not (though I could be wrong). Shebang lines are the best way to choose a specific version.

Yes, that's a very bad default IMO. It was probably reasonable at the
time, but it should be fixed now - at least to a simple "the latest
version". Getting a user who's just installed Python 3.5 (with a
system Python 2.7 present) to edit an ini file in C:\Windows\System32
just to use his new version is *not* a good user experience.

Paul


More information about the Python-Dev mailing list