I am trying to use the urllib library as part of a python program for web scraping. It contains the module request.py which has to import http.client. However I keep on getting this message:
ModuleNotFoundError: No module named 'http.client'; 'http' is not a package.
However, my Python libraries folder "Lib" contains both http folder and urllib folder. The http folder also contains client.py file. What could possibly be wrong? Please help I'm a beginner.
In python you cannot override your packages. You maybe have another module in your code called "http". Just change it to "web" or any name you like and it should work.
This was an issue I had in my project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With