On 29 October 2017 at 10:40, Stephan Houben <stephan...@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 _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/