python3报错:No module named 'urllib2'
程序员文章站
2022-05-28 22:28:11
...
报错原因:python3中已经把urllib2集成到urllib中去了
遇到错误:我是在使用urlopen(request)中报错的
解决方案:
import urllib.request
response = urllib.request.urlopen(request)
推荐阅读
-
下载python中Crypto库报错:ModuleNotFoundError: No module named ‘Crypto’的解决
-
下载python中Crypto库报错:ModuleNotFoundError: No module named ‘Crypto’的解决
-
解决方法:在Python中使用Win32api报错的问题,No module named win32api
-
Python3中无法导入ssl模块的解决办法和python3.7 ModuleNotFoundError: No module named bz2解决办法
-
Django重装mysql后启动报错:No module named ‘MySQLdb’的解决方法
-
Centos7 执行firewall-cmd –permanent –add-service=mysql报错“ModuleNotFoundError: No module named 'gi'”
-
Linux—运行yum报错:No module named yum
-
PyCharm导入pymysql包运行报错问题解决:No module named 'PyMySQL'
-
【昊鼎王五】执行python3脚本,报“ModuleNotFoundError: No module named 'dateutil'”错的解决方法
-
解决pycharm终端/cmd运行python脚本报错“ImportError/ModuleNotFoundError:No Module named ...”