[Python-ideas] Make py.exe default to Python 3

Paul Moore p.f.moore at gmail.com
Tue Mar 15 09:12:53 EDT 2016


On 15 March 2016 at 12:38, Oscar Benjamin <oscar.j.benjamin at gmail.com> wrote:
> Why would we not want python on PATH?

You should probably go and hunt out previous discussions (your best
bet is likely the python-dev archives). They were pretty extensive,
and I'd likely get details wrong if I tried to summarise.

> If it's because of having
> multiple installed Pythons then maybe it's possible to improve the
> installer so that it gives the user a selection of which is on PATH
> and adds it by default if it isn't already there.

Certainly it's only an issue if the user has multiple Pythons. Of
course, this can include things like conda or ActiveState Python, or
programs like Lilypond that bundle Python.

Some issues I recall:

1. You can improve the Python 3.6 installer, but if the user installs
Python 2.7 after 3.6, they'll get the old installer with that. And
conda may do something else altogether. So fixing just one installer
doesn't remove the issue.
2. User installs can only add to the user part of PATH, which the OS
adds *after* the system PATH. So if you do a system install and a user
install, the system install will *always* take precendence, regardless
of what you ask for. This is particularly problematic as Python 3.5+
defaults to a user install.
3. When you ask for a new Python to be added to PATH, should previous
ones be removed? If you then uninstall the new Python, will you be
left with nothing on PATH?

I've seen the view expressed that PATH is for the user to manage and
installers have no business changing it at all. While I'm not sure
that many people who write installers would agree with that, having
dealt with my own share of messed up PATHs caused by installers, I can
certainly sympathise with that position.

Paul


More information about the Python-ideas mailing list