Mac版Pycharm无法连接数据库
来源:3-2 配置表单页面
昭昭li
2017-03-01
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/lijianzhao/Documents/Py_Env/py2.7/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: /usr/local/opt/mysql/lib/libmysqlclient.20.dylib
Referenced from: /Users/lijianzhao/Documents/Py_Env/py2.7/lib/python2.7/site-packages/_mysql.so
Reason: image not found
写回答
1回答
-
矢寸心
2017-03-01
试试下面的方法,其中mysql-....-x86_64目录名称取决于你安装的MySQL以及当前Mac版本
sudo ln -s /Users/lijianzhao/Documents/mysql-....-x86_64/lib/libmysqlclient.20.dylib /usr/local/opt/mysql/lib/libmysqlclient.20.dylib
012017-03-01
相似问题