[Distutils] pip install error

Tim Golden mail at timgolden.me.uk
Wed Feb 22 13:36:36 EST 2017


On 22/02/2017 18:21, William Gan wrote:
> I got your email from the Installing Python Modules page in the Python
> 3.6.0 documentation.

You might do better ask this kind of question on the Tutor list:

https://mail.python.org/mailman/listinfo/tutor

> I encountered an error when trying to install a package in the Python
> IDLE shell:
>
>>>> python -m pip install numpy
>
> SyntaxError: invalid syntax

However, the answer here is straightforward enough: the python/pip 
command is an operating system command, ie to be run from the Command 
Prompt, not from the Python prompt.

So:

* Press the Windows Key or otherwise invoke Windows' search mode

* Start typing: cmd

* An icon for the "Command Prompt" should appear. Click it.

* In the window which appears, at the command prompt, type the command 
you used above: python -mpip install numpy

TJG


More information about the Distutils-SIG mailing list