Cant import sql.connector
Hi Folks
I am new to Python and still learning.
When I use the shell or Idle in Python3.3.1 I can import mysql.connector and test my script line by line OK but when I save my as a .py the import sql.connector fails with the following error:
Traceback (most recent call last):
File "<frozen importlib.
AttributeError: 'module' object has no attribute '__path__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\
import mysql.connector
File "C:\Users\
import mysql.connector
ImportError: No module named 'mysql.connector'; mysql is not a package
Question information
- Language:
- Chinese (Simplified) Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Paul Fenwick
- Solved:
- Last query:
- Last reply: