-1

我使用flask。我使用安装MySQL easy_install mysql-python,然后尝试运行我的app.py,但是出现了这些错误。这些是什么意思?

Traceback (most recent call last):
  File "app.py", line 7, in <module>
    import MySQLdb
  File "/Users/ozcan/Documents/python/venv/lib/python2.7/site-packages/MySQLdb/__init__.py", line 19, in <module>
    import _mysql
ImportError: dlopen(/Users/ozcan/Documents/python/venv/lib/python2.7/site-packages/_mysql.so, 2): no suitable image found.  Did find:
    /Users/ozcan/Documents/python/venv/lib/python2.7/site-packages/_mysql.so: mach-o, but wrong architecture
4

1 回答 1

-1

我建议改用 Flask-MySQL。这是文档https://flask-mysql.readthedocs.org/en/latest/

于 2013-02-20T11:01:36.217 回答