首页 >数据库 >mysql教程 >mac中安装mysql-python遇到的问题_MySQL

mac中安装mysql-python遇到的问题_MySQL

WBOY
WBOY原创
2016-06-01 13:06:351428浏览

python

错误1:mysql_config not found

问题描述:在执行sudo pip install mysql-python安装时报错误:EnvironmentError: mysql_config not found

解决办法:在执行pip安装之前,先执行export PATH=$PATH:/usr/local/mysql/bin即可

错误2:image not found

问题描述:安装成功后,在执行python语句create_engine('mysql://root:@localhost/test')使的时候报错:Reason: image not found

解决办法:执行:sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylibsudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql后即可

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn