gpt4 book ai didi

python - 操作系统错误 : mysql_config not found

转载 作者:行者123 更新时间:2023-11-29 02:12:23 26 4
gpt4 key购买 nike

我今天尝试在 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****

我将非常感谢任何帮助。

最佳答案

尝试通过终端添加路径:

export PATH=$PATH:/usr/local/mysql/bin

要使其永久添加到 /etc/paths 文件的末尾。

关于python - 操作系统错误 : mysql_config not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48253975/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com