Landscaper3345
Landscaper3345

Reputation: 375

Unable to import python requests in VSCode

I read this in addition to MANY other things: Importing requests module does not work

I am using VSCode and python 3.8. I am able to import it seems any library except "requests" Given the ages of the previous posts I hope to know what a good current next step could be, please and thank you

import math
import asynchat
import signal
import importlib
import requests  <-----Will NOT import

response = requests.get("http://api.open-notify.org/astros.json" [api.open-notify.org])

print(response.text)
print(response)

Upvotes: 1

Views: 367

Answers (1)

Zichzheng
Zichzheng

Reputation: 1290

I think your requests is not well installed. Make sure it's installed with the python you are using with.

Try pip3 install requests.

Upvotes: 1

Related Questions