赞
踩
'Did you install mysqlclient or MySQL-python?' % e
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/usr/local/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/_mysql.so
Reason: image not found.
Did you install mysqlclient or MySQL-python?
编辑文件:/Users/YourMacUserName/.bash_profile
export PATH=$PATH:/usr/local/mysql/bin
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/
然后使变更生效"source ~/.bash_profile"即可正确导入MySQLdb模块。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。