Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python
  3. Question
Python

Python Requests module - Import Error No module named requests

Asked by Cameron Oliver Jul 12, 2021 1.5K views 1 answer
Share

About this question

I'm trying to use the requests module, but I'm having trouble importing it. I'm running Python 3.4.2 (which I checked is officially supported) on Windows 7. I've tried installing it the following ways, each time with no luck: Using pip install requests. Downloading the zip ball and installing using setup.py install Downloading the source code and manually copying the folder to Python34/Lib/site-packages. In all those cases, I can see that the requests library is in the site-packages folder. If I run import requests from the python interpreter, it works fine. This works:

$ python
>>> import requests
>>> requests.get("http://127.0.0.1")

It always results in this error:

Traceback (most recent call last):
  File "E:test.py", line 1, in
    import requests
ImportError: No module named requests  

How do I fix an Importerror No module named Request python?

 

Your answer

1 Answer

More Python discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.