使用xampp运行mysql但通过pip安装mysqlclient会抛出错误EnvironmentError:找不到mysql_config

时间:2018-12-24 08:21:07

标签: mysql xampp mysql-python

我已经在运行mysql MariaDB的mac OSX上安装了XAMPP,现在可以从终端运行mysql了,但是如果我尝试安装mysqlclient,则会收到错误消息:

  Complete output from command python setup.py egg_info:
    sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/43/m1qv9zf53q19sqh6h9kg9pz80000gn/T/pip-install-7vpJZR/mysqlclient/setup.py", line 16, in <module>
        metadata, options = get_config()
      File "setup_posix.py", line 53, in get_config
        libs = mysql_config("libs_r")
      File "setup_posix.py", line 28, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found

在将其发布到此处之前,我尝试遵循此线程Mac OS X - EnvironmentError: mysql_config not found,但是我认为由于XAMPP安装了我的mysql,因此他们在该线程中讨论的配置不适用于我遇到的问题

任何帮助将不胜感激。

0 个答案:

没有答案