如果安装的模块不正确,如何导入模块?

时间:2020-06-06 10:26:54

标签: python mysql python-2.7 sqlite mysql-python

我遇到以下错误:

Traceback (most recent call last):
  File "TicketGeneration_test.py", line 6, in <module>
    from MysqlConnection import SQLConnection
  File "/Users/ashish.kumar/MerchantRisk/June5th/reports/MysqlConnection.py", line 1,     in <module>
    import MySQLdb
ImportError: No module named MySQLdb

我已经尝试过:

 pip install MySQL-python 
 pip install mysqlclient

我的python版本是Python 2.7.16

0 个答案:

没有答案