Jaeyoon Lee
Jaeyoon Lee

Reputation: 1

The reason of ImportError: No module named requests

I installed requests to use 'pip3 install requests, but always ImportError: No module named requests.

import requests
res=requests.get("http://naver.com")
print("response :", res.status_code)

Upvotes: 0

Views: 99

Answers (1)

ghchoi
ghchoi

Reputation: 5156

Probably because your pip3 is not for your python.

which pip
which python

may show different paths.

Correct the path or try:

python -m pip install requests

Upvotes: 1

Related Questions