E:\PrograFiles\python-3.5\python.exe F:/AG-Data/Space-Python/Code/imooc/wikitomysql.py
Traceback (most recent call last):
File "F:/AG-Data/Space-Python/Code/imooc/wikitomysql.py", line 7, in <module>
import pymysql.cursors
ImportError: No module named 'pymysql.cursors'; 'pymysql' is not a package
在python命令行的交互环境,输入 import pymysql.cursors 会报错吗?
pymysql安装不成功,有安装成功的吗
打开后是这样的
E:\PrograFiles\python-3.5\python.exe F:/AG-Data/Space-Python/Code/imooc/wikitomysql.py
Traceback (most recent call last):
Open main menu <----> https://en.m.wikipedia.org//wiki/Special:MobileMenu
File "F:/AG-Data/Space-Python/Code/imooc/wikitomysql.py", line 18, in <module>
connection = pymysql.connect(host='localhost',
AttributeError: module 'pymysql' has no attribute 'connect'
直接import pymysql