在python3.3后urllib2已经不能再用,只能用urllib.request来代替
response=urllib2.urlopen('
  File "b.py", line 1, in <module>
ImportError: No module named 'urllib2'

将urllib2给改为urllib.request即可正常运行
import urllib.request
print(urllib.request.__file__)

相关文章:

  • 2021-05-04
  • 2021-05-31
  • 2021-07-21
  • 2022-12-23
  • 2022-01-21
  • 2021-11-02
  • 2022-12-23
  • 2021-09-04
猜你喜欢
  • 2022-12-23
  • 2021-08-11
  • 2021-08-15
  • 2021-10-29
  • 2021-12-31
  • 2022-12-23
  • 2021-05-16
相关资源
相似解决方案