gpt4 book ai didi

python - MySQL-python - 找不到 mysql_config

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

我正在尝试使用 Windows MySQL 服务器在 Cygwin 上安装 MySQLDB/MySQL-python。安装时出现以下错误。

有没有办法解决以下两个问题。我不想在 cygwin 上安装 MySQLDB。我只想在代码中使用连接器。

$ pip install MySQL-python
Downloading/unpacking MySQL-python
EnvironmentError: mysql_config not found

pip install MySQLdb
Downloading/unpacking MySQLdb
Could not find any downloads that satisfy the requirement MySQLdb

感谢您的帮助。

最佳答案

安装“libmysqlclient-devel”后我解决了这个问题

apt-cyg install libmysqlclient-devel

MySQLdb 仍然无法处理 sock 文件错误。为该问题打开了另一个线程

关于python - MySQL-python - 找不到 mysql_config,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23929477/

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