Fix: ModuleNotFoundError: No module named requests

Table of Contents

import requests

response = requests.get("")
% python3
Traceback (most recent call last):
  File "/Users/c2ctechtv/Desktop/virtualenv/", line 1, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
Fix - ModuleNotFoundError- No module named requests

Reason for the Error

    The ModuleNotFoundError occurs when you try to import the requests module, but it's not available in your current Python environment.

    Note that the requests module is not part of the standard Python library and hence needs to be installed separately.


    To fix this issue, you need to install the requests module using pip package manager.

    pip install requests
    pip3 install requests


The ModuleNotFoundError: No module named 'requests' error can occur when you try to import the requests module that is not installed in your Python environment.

We can fix this error by installing the requests module using pip.

Documents to Refer:


Facing issues? Have Questions? Post them here! I am happy to answer!

Author: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap