[Python-ideas] install pip packages from Python prompt

Chris Angelico rosuav at gmail.com
Tue Oct 31 14:05:29 EDT 2017


On Wed, Nov 1, 2017 at 2:49 AM, Chris Barker <chris.barker at noaa.gov> wrote:
> And sure, some of those are completly clueless about what a command line is
> and how to use it, but others DO have an idea about the command line, but
> dont know that:
>
>>>> pip install something
>   File "<stdin>", line 1
>     pip install something
>               ^
> SyntaxError: invalid syntax
>
> means: "this was supposed to be run at the command prompt"
>
> So I think defining a "pip" builtin that simply gave a helpful message would
> be a good start.
>
> (hmm, it's a syntax error, so not as simple as a builtin -- but it could be
> caught somehow to give a better message)

This sounds like the job for an enhanced REPL like Jupyter/ipython. In
fact, it might already exist - I haven't looked.

ChrisA


More information about the Python-ideas mailing list