SyntaxError: Why Does Pip Install Invalid Syntax?
I'm trying to use pip to install a package. I try to run pip install from the Python shell, but I get a SyntaxError. How do I use pip to install the package without getting python pip invalid syntax error?
>>> pip install selenium
^
SyntaxE
r
r
o
r: invalid syntax
In case of invalid syntax pip install -
Use the command line, not the Python shell (DOS, PowerShell in Windows).
C:Program FilesPython2.7Scripts> pip install XYZ
If you installed Python into your PATH using the latest installers, you don't need to be in that folder to run pip
Terminal in Mac or Linux
$ pip install XYZ