我能够在python解释器中导入,通过在运行python脚本时反复提示找不到模块。我该如何解决这个问题?
#Python Interpreter#
python
Python 2.7.15+ (default, Nov 27 2018, 23:36:35)
[GCC 7.3.0] on linux2
>>> import mysql.connector
>>>
#Python script, shows error#
python MySQLConnect.py
Traceback (most recent call last):
File "MySQLConnect.py", line 2, in <module>
import mysql.connector
ImportError: No module named mysql.connector