On 6 November 2017 at 18:50, Stephan Houben <stephan...@gmail.com> wrote:
> Hi Michel,
>
> That's exactly why I proposed a `pip` function available from the Python
> prompt.
> I suppose you could still tell your students to copy/paste the following
> into their
> Python interpreter.
>
> def pip(args):
>     import sys
>     import subprocess
>     subprocess.check_call([sys.executable, "-m", "pip"] + args.split())
>     print("Please restart Python now to use installed or upgraded
> packages.")

Depending on where and how Python is installed, this may still not
work (while I'll grant that Linux users are more likely to already be
familiar with the command line than Windows and Mac OS X users, it's
still a non-trivial step from there to realising why "sudo pip
install" is almost always a bad idea)

> I suppose an alternative is to set up jupyterhub
>
> https://jupyterhub.readthedocs.io/en/latest/
>
> and let all your students just access that from a webbrowser.

Yep, and lots of teachers use services like PythonAnywhere,
trinket.io, and similar, precisely because the only thing the learners
need locally is a web browser. The main downside is that learning that
way isn't quite as transferable a skill, since it completely hides the
code packaging and distribution step. However, it's a good option when
the primary aim is to teach computational skills, and Python is just
the vehicle used for that purpose.

Software Carpentry starts out with the Anaconda distribution, as it
not only improves the cross-platform UX consistent situation, it also
deals with the external binary dependency problem (at least for the
core set of packages provided either natively or via conda-forge).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to