[Python-ideas] Looking for input to help with the pip situation
p.f.moore at gmail.com
Sun Nov 12 07:20:45 EST 2017
On 12 November 2017 at 06:19, Michel Desmoulin
<desmoulinmichel at gmail.com> wrote:
>> 1. Go back to adding Python to PATH. Because our installers don't say
>> "do you want to uninstall the old version", we should probably do a
>> check for a "python" command on PATH in the installer, and if there is
>> one, warn the user "You already have Python installed - if you are
>> upgrading you should manually uninstall the old version first,
>> otherwise your old installation will remain the default". We could get
>> more complex at this point, but that depends on what capabilities we
>> can include in the installer - I don't know how powerful the toolset
> You don't even have to do that. We can detect it and prompt : "which
> python version do you want to be available by default ?", and then list
> command to run the alternative versions.
I deliberately avoided suggesting automatically changing the default
version, because that's fraught with problems. You need to remove the
previous default from PATH, and if you're doing a user install but the
previous version is in the system PATH you don't have the privileges
to do that. If the previous version was another distribution (e.g.
Anaconda) you've no way to know that and conversely you don't know how
to remove that distribution's path entries (is there a Scripts
directory to remove, did they use bin instead, etc). The list of
potential problems is endless.
>> We still have to deal with the fact that basically every Unix
>> environment is "advanced" in the above sense (the python2/python3
>> split). I don't have a solution for that (other than "upgrade to
>> Windows" ;-)).
> Provide the "py" command on linux and mac. And make it the default
> recommended way in the documentation.
+1 from me.
> Well, not exactly. Do you do python -m venv, or py -x.x -m venv or
> pythonx -m venv ? Wait, it's not installed by default on debian.
Seriously? Debian don't provide venv in the standard Python install?
That's just broken.
> Virtualenvs are a hard tool to use for beginners.
Agreed. Genuine beginners just install Python, then use it. If they
install extra packages, they want them to be available to all of their
> A lot of people on this list have forgotten their early years it seems.
Maybe. But the default beginner approach *does* have its problems, and
guiding beginners to a better approach is a good idea. It's just that
the starting point needs to be showing them why the problems solved by
tools like virtualenv matter to them.
At this point, though, we've moved into a much bigger issue than "it's
hard to get started with pip". We should keep the discussion focused
on the immediate problem, and not try to solve everything at once.
More information about the Python-ideas