How to utilize pip to install the package without receiving python pip invalid syntax error message?
I am attempting to utilize pip for installing a package. I tried to run pip install from the Python shell. However, I received a SyntaxError. How to use pip for installing the package without getting this error?
>>> pip install selenium
syntaxE
R
R
O
R: invalid syntax
The Python pip invalid syntax error is seen since pip is executed from the command line, but not the Python interpreter. It’s a program installing modules, hence it can be used from Python. After installing the module, you may open the Python shell and import selenium. The Python shell is a communicative interpreter rather than a command line. Python code is entered there instead of commands. So, utilize the command line instead of the Python shell.
C:Program FilesPython2. 7Script> pip install XYZ
Incase Python is installed in the PATH through the recent installers, The folder is not required to run pip.
The Python online training offered at JanBask Training gives you an experience like offline classes thereby saving the students from the tiring journey to travel to the physical locations. The course provides a total Python discipline’s preparation by touching on every core concept from basic to advanced thereby making your job ready to face the tough competitive market.