标签:bsp framework ons logs 连接数 连接 blog style sql
执行如下连接数据库的语句:
engine = create_engine(‘mysql://root:root@127.0.0.1/stock?charset=utf8‘)
报错如下:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so, 2): Library not loaded: libmysqlclient.18.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/_mysql.cpython-35m-darwin.so Reason: image not found
解决办法:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib
参考Stack Overflow:https://stackoverflow.com/questions/6383310/python-mysqldb-library-not-loaded-libmysqlclient-18-dylib
标签:bsp framework ons logs 连接数 连接 blog style sql
原文地址:http://www.cnblogs.com/zhzhang/p/7367350.html