There was an error in using Pycharm compilation when you first learned that Python is ready to learn a reptile
This is the source code:
#!usr/bin/python
import urllib.request
url = "http://www.baidu.com" Get
= Urllib.request.urlopen (URL). Read ()
print (GET)
This is inherently simple, but the following error occurred:
C:\Programming\Python\WeChat\venv\Scripts\python.exe c:/programming/python/learning/spiderlearning.py
Traceback (most recent call last):
File "c:/programming/python/learning/spiderlearning.py", line 2, in <module>
Import Urllib.request
File "C:\Users\16689\AppData\Local\Programs\Python\Python36\Lib\urllib\request.py", line <module>
Import Http.client
Modulenotfounderror:no module named ' Http.client '; ' HTTP ' is not a package
I find it baffling, finally found that I have a http.py file under the Unified folder, but it is strange that I run http.py can run successfully
This should be the error caused by the keyword sensitivity. Delete this file, modify the file name and then you can run normally.