@python3
Try using
import urllib.request
Only if you trying to work with urllib
Else try to uninstall requests and then again install it using pip
pip uninstall requests
and again install it
pip install requests
or if you did’nt get what I am saying so please visit
https://scmquest.com/resolved-importerror-no-module-named-requests-usr-bin-python-no-module-named-pip-on-macos/
or
Import urllib.request, ImportError: No module named request
If it is installed this will WORK:
c:>python (or on Mac/Linux “$ python”)
>>> import requests
>>> requests.get(“http://127.0.0.1”)
If you see this error when running your script/IDE:
Traceback (most recent call last): File “E:test.py”, line 1, in
import requests
ImportError: No module named requests
Try:
python script.py
Answer is based on https://www.edureka.co/community/84584/python-requests-module-import-error-module-named-requests
Then the trick for me was not to start up a VirtualEnv, I actually found I was running the x64 version of python when I’d installed the requests package into the python 32 bit folder c:program files (x86)python37-32libsite-packages. This is a screenshot from the internet but it shows you how to change the interpreter you’re using – in my case – I need to set it to Python 3.7.4(x86) 32 bit: