我今天试着在python上安装mysqlclient,但是它变得一团糟,给了我这个错误
***raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found***then I tried to edit the mysql.config file by adding
***#Create options
libs="-L$pkglibdir"
libs="$libs -lmysqlclient -lssl -lcrypto"***
但还是给了我同样的错误。我使用的是mac版本10.6.8。错误的详细信息如下:
****Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/s4/s4O4m-85EgGDXYYsUzcvNU+++TQ/-Tmp-/pip-
build-s7w0agk6/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/s4/s4O4m-85EgGDXYYsUzcvNU+++TQ/-Tmp-/pip-
build-s7w0agk6/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/private/var/folders/s4/s4O4m-85EgGDXYYsUzcvNU+++TQ/-Tmp-/pip-
build-s7w0agk6/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found****
我将非常感谢任何帮助。
1条答案
按热度按时间qhhrdooz1#
尝试通过终端添加路径:
要使其永久化,请将其添加到
/etc/paths
文件。