[Distutils] PIP not recognized in python shell

Nick Coghlan ncoghlan at gmail.com
Wed Oct 4 08:40:04 EDT 2017

On 4 October 2017 at 05:27, Milind Rangnekar <milindha at gmail.com> wrote:
>  However, PIP is  not recognized in Python 3.4.3 Shell.
>>>> pip install
> SyntaxError: invalid syntax
>>>> pip
> Traceback (most recent call last):
>   File "<pyshell#11>", line 1, in <module>
>     pip
> NameError: name 'pip' is not defined
>>>> python -m pip install beautifulsoup4
> SyntaxError: invalid syntax

This is expected behaviour, as the Python REPL is for running Python
code, not for running command line executables.

"pip" and "python" don't work in the Python REPL for the same reason
that attempting to run "dir", "cd" or "systeminfo" doesn't work -
they're shell commands rather than Python code.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Distutils-SIG mailing list