时间:2021-07-01 10:21:17 帮助过:38人阅读
问题描述:在执行sudo pip install mysql-python
安装时报错误:EnvironmentError: mysql_config not found
解决办法:在执行pip安装之前,先执行export PATH=$PATH:/usr/local/mysql/bin
即可
问题描述:安装成功后,在执行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.dylib
和sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
后即可