安装mysql_python的适合遇到mysql_config not found解决方案(mac)

安装mysql_python的适合遇到mysql_config not found解决方案(mac)

用pip安装MySQL-python时候遇到报错:

------我是分割线------

    Complete output from command python setup.py egg_info:
    sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/tmp/pip-build-bj2vIy/MySQL-python/setup.py", line 17, in <module>
        metadata, options = get_config()
      File "setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "setup_posix.py", line 25, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-bj2vIy/MySQL-python

------我是分割线------

一招制敌:

终端输入:sudo ln -s /usr/local/mysql/bin/* /usr/bin

然后再重新pip安装,终端输入:sudo pip install MySQL-python

接下来安装就没有问题了

详细讲述推荐一个连接:http://blog.csdn.net/janronehoo/article/details/25207825

你可能感兴趣的:(安装mysql_python的适合遇到mysql_config not found解决方案(mac))