Python Error – ModuleNotFoundError: No module named [RESOLVED]

You may get the following error in Python when you run a script :-

ModuleNotFoundError: No module named ‘xxxxx’

This will be followed by the module name for example you may see ModuleNotFoundError: No module named ‘requests’

This is hopefully a quick and easy one to fix, you just need to install the missing module.

If you are in Windows you can do this from the “Run” prompt by running the pip install command.

Example :-

C:\Users\user1\AppData\Local\Programs\Python\Python37\Scripts\pip install requests

Note : You need to change the above to match your Python install directory.


Duncan is a technology professional with over 20 years experience of working in various IT roles. He has a interest in cyber security, and has a wide range of other skills in radio, electronics and telecommunications.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: