Python module not found error
Your Python program tried to load a library called requests but could not find it because the library is not installed in the current Python setup.
Likely causes
- The requests library is missing from the Python environment that is running the code. (most likely)
- The code is running under a different Python installation or virtual environment than the one where requests was installed. (possible)
How to fix it (safest first)
1. Check which Python is activeSafe
Open a terminal or command prompt and run the command below to see the Python version and path in use.
python --version && python -c "import sys; print(sys.executable)"
2. Install the missing libraryChanges settings
In the same terminal, run the command below to add the requests library. This may require an internet connection.
python -m pip install requests
If that didn't fix it
Try running the install command again using the full path to the exact Python executable shown in the first step, or create and activate a new virtual environment before installing.
When to see a technician
Consult a software developer if the error occurs inside a larger application or when you cannot run terminal commands yourself.
Last checked 2026-10-16 · Report a problem