import requests ModuleNotFoundError: No module named 'requests'
See original GitHub issuecampaigns.py imports a module that is not in requirements.txt. This is currently causing a ModuleNotFoundError
.
We can fix this in one of two ways:
- Update the code to use the built-in
urllib
module - Add
requests
torequirements.txt
My preference is to use the urllib
module which is built into python3.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
python - ImportError: No module named requests
You get an import error because requests are not a built-in module instead, it is created by someone else ...
Read more >[Fixed] ModuleNotFoundError: No module named 'requests'
How to Fix “ModuleNotFoundError: No module named 'requests'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >ModuleNotFoundError: No module named 'requests' in Python
The Python "ModuleNotFoundError: No module named 'requests'" occurs when we forget to install the requests module before importing it or install it in...
Read more >ModuleNotFoundError: No module named 'requests' in Python 3
If you are getting "ModuleNotFoundError: No module named 'requests'" error then it means either requests module is not installed or if it is ......
Read more >How to pip install the requests module to solve import errors?
No module named requests – even after i pip install ... Issue: you are still getting the import error even after executing the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In that case, it’s probably OK to leave it as is. I’ve already added
requests
torequirements.txt
. If we run into any limitations with the module down the road, we can refactor it.I used
requests
out of habit. If we’d prefer to refactor this to useurllib
, I’m fine with that.(Of course, the easiest fix is probably adding
requests
torequirements.txt
🙂 )