Thursday, April 23, 2020

PYTHON PIP Error File "", line 1

PYTHON PIP  Error

>>> pip install request
  File "<stdin>", line 1
    pip install request
              ^
SyntaxError: invalid syntax

First of all you need to ensure if pip is okay. to do it. type the command below. open windows command prompt, click start and typ CMD. 

python -m ensurepip --default-pip

if ok. this will return


python -m pip install SomePackage

so to get the requests package (you need this so that you can use python to deal with web APIs web-services)

python -m pip install requests


No comments:

Post a Comment

Since we see a lot of users SPAMMING and abusing our comment section. we are now strictly checking new comments before approving it on haktech. of you like to promote your website. you can always contact me so i can do SEO for your website.