解决No module named MySQLdb 错误
2015-10-07 本文已影响47人
无名氏_1
原因:环境变量没有设置 Python 2.7 找不到mysql
解决办法:
vim ~/.bash_profile //增加一句
export PATH=${PATH}:/usr/local/mysql/bin
重新加载 .bash_profile
<code>source ~/.bash_profile</code>
原因:环境变量没有设置 Python 2.7 找不到mysql
解决办法:
vim ~/.bash_profile //增加一句
export PATH=${PATH}:/usr/local/mysql/bin
重新加载 .bash_profile
<code>source ~/.bash_profile</code>