当我在mac上运行这个程序时,我收到了以下错误消息。它在原始Linux计算机上运行良好:File "setupPpiDb.py", line 406, in modules
createDataBase(pdbsToAnalyzeWithChains)
File "setupPpiDb.py", line 202, in createDataBase
''' %(os.path.join(RESULTS_DIR, 'PerAtomDistance.csv')))
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/MySQLdb/cursors.py", line 412, in _query
rowcount = self._do_query(q)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/MySQLdb/cursors.py", line 375, in _do_query
db.query(q)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/MySQLdb/connections.py", line 276, in query
_mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (1148, 'The used command is not allowed with this MySQL version')
我在mac上运行Python3并下载了最新的社区下载版本MySQL数据库。完整命令如下:
^{pr2}$
我读到有人发布了本地填充命令。但是,第二行命令有问题,我用local_infile=1连接到数据库:
在MySQLdb.connect(host='localhost',user=user,passwd=passwd,db=db_NAME,local_infile=1)
有什么办法解决这个问题吗?在