P
pcchen
Sorry I have searched related topic but none could point out this
problem.
I am currently using python 3.1.2:
And for the following three simple lines of code, borrowed from
official python-doc 3.1.2:
They could cause this error:
File "./http.py", line 3, in <module>
from urllib.request import urlopen
File "/usr/local/lib/python3.1/urllib/request.py", line 88, in
<module>
import http.client
File "/home/pcchen/Python/http.py", line 3, in <module>
from urllib.request import urlopen
ImportError: cannot import name urlopen
All the related discussions point to urlopen has been moved from
urllib to urllib.request, but none can discribe the above error.
Any information is appreciated, thank you so much.
problem.
I am currently using python 3.1.2:
Python 3.1.2 (r312:79147, Jun 30 2010, 11:58:11)
[GCC 4.2.1 20070719 [FreeBSD]] on freebsd8
And for the following three simple lines of code, borrowed from
official python-doc 3.1.2:
They could cause this error:
File "./http.py", line 3, in <module>
from urllib.request import urlopen
File "/usr/local/lib/python3.1/urllib/request.py", line 88, in
<module>
import http.client
File "/home/pcchen/Python/http.py", line 3, in <module>
from urllib.request import urlopen
ImportError: cannot import name urlopen
All the related discussions point to urlopen has been moved from
urllib to urllib.request, but none can discribe the above error.
Any information is appreciated, thank you so much.