我试图安装mysql-python以用于Django,但收到以下错误:
File "setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
我已经看到其他问题说这是因为它不在路上。我的路径看起来像这样:
/cygdrive/c/Users/ddnm/Documents/skincare/skincare/bin:/home/ddnm/bin:/usr/local/bin:/home/ddnm/.local/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Users/ddnm/.babun:/cygdrive/c/Python27:/cygdrive/c/Python27/Lib:/cygdrive/c/Python27/DLLs:/cygdrive/c/Python27/Lib/lib-tk:/cygdrive/c/Program Files/MySQL/MySQL Server 5.7/bin
特别是,我认为问题是Windows的mysql_config是一个perl脚本,所以以下是令人困惑的cygwin:
master » which mysql_config
mysql_config not found
master » which mysql_config.pl
/cygdrive/c/Program Files/MySQL/MySQL Server 5.7/bin/mysql_config.pl
有什么建议/想法吗?感谢
答案 0 :(得分:1)
你不能将cygwin编程与非cygwin程序混合使用
要查找mysql_config
哪个包,您可以使用:
$ cygcheck -p mysql_config
Found 15 matches for mysql_config
libmysqlclient-devel-10.1.18-1 - libmysqlclient-devel: MariaDB/MySQL database client library (development) (installed binaries and support files)
libmysqlclient-devel-10.1.19-1 - libmysqlclient-devel: MariaDB/MySQL database client library (development) (installed binaries and support files)
libmysqlclient-devel-10.1.26-1 - libmysqlclient-devel: MariaDB/MySQL database client library (development)
.....
因此您需要安装libmysqlclient-devel
。