我在flask_mysqldb上出现导入错误。我收到以下错误消息:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/MySQLdb/_mysql.cpython-37m-darwin.so
Library not loaded: @rpath/libmysqlclient.18.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/MySQLdb/_mysql.cpython-37m-darwin.so
Reason: image not found
this is the screenshot of the error
当我运行以下命令时会发生这种情况:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.d
之后,我会收到此回复"ln: /usr/lib/libmysqlclient.18.d: File exists"
我实际上不知道问题出在哪里。