Why does “pip install” inside Python raise a SyntaxError?

后端 未结 8 1002
天命终不由人
天命终不由人 2020-11-21 05:46

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. Why do I get this error? H

8条回答
  •  没有蜡笔的小新
    2020-11-21 06:21

    Initially I too faced this same problem, I installed python and when I run pip command it used to throw me an error like shown in pic below.

    Make Sure pip path is added in environmental variables. For me, the python and pip installation path is::
    Python: C:\Users\fhhz\AppData\Local\Programs\Python\Python38\
    pip: C:\Users\fhhz\AppData\Local\Programs\Python\Python38\Scripts
    Both these paths were added to path in environmental variables.

    Now Open a new cmd window and type pip, you should be seeing a screen as below.

    Now type pip install <>. Here I'm installing package spyder so my command line statement will be as pip install spyder and here goes my running screen..

    and I hope we are done with this!!

提交回复
热议问题