简体   繁体   中英

import mysql.connector ModuleNotFoundError: No module named 'mysql.connector'; 'mysql' is not a package

import mysql.connector ModuleNotFoundError: No module named 'mysql.connector'; 'mysql' is not a package

pip install mysql-connector-python-rf python version-3.7.2

pip install mysql-connector-python-rf

pip install mysql-connector-python succesfully installed import mysql.connector ModuleNotFoundError: No module named 'mysql.connector'; 'mysql' is not a package whereas when I import mysql gives no error message

通过将文件重命名为MySQL.py以外的任何内容来解决,因为它只是尝试加载自己我猜

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM