[Python-ideas] Defining an easily installable "Recommended baseline package set"

Paul Moore p.f.moore at gmail.com
Sun Oct 29 07:50:26 EDT 2017


On 29 October 2017 at 10:40, Stephan Houben <stephanh42 at gmail.com> wrote:
> Perhaps slightly off-topic, but I have sometimes wondered if
> pip could not be made somewhat friendlier for the absolute newbie
> and the classroom context.
>
> Some concrete proposals.
>
> 1. Add a function `pip` to the interactive interpreter
>   (similar to how `help` is available).
>
>   def pip(args):
>       import sys
>       import subprocess
>       subprocess.check_call([sys.executable, "-m", "pip"] + args.split())
>
>    This allows people to install something using pip as long as they have a
>    Python prompt open, and avoids instructors to have to deal with
> platform-specific
>    instructions for various shells. Also avoids confusion when multiple
> Python interpreters
>    are available (it operates in the context of the current interpreter.)

There are subtle issues around whether newly installed/upgraded
packages are visible in a running Python interpreter. It's possible
that this would result in *more* confusion than the current situation.
I can see the appeal of something like this, but it's not as simple as
it looks. If you want to discuss this further, I'd definitely suggest
making it a thread of its own. Personally, as a pip maintainer, I'm -0
on this (possibly even -1).

Paul


More information about the Python-ideas mailing list