我在AWS上创建了一个EC2实例,并使用PuTTY连接它。
我无法使用python命令安装MySQL python,如下所示:
pip安装MySQL python(通过root权限)
以下是错误的控制台输出
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-JGbAEI/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-JGbAEI/MySQL-python/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-JGbAEI/MySQL-python/setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-JGbAEI/MySQL-python
不过,我可以使用pip安装其他软件包
请引导。在
看起来mysql_config丢失了,所以请确保mysql_config确实已安装。在
例如,在Debian/Ubuntu上,您必须安装以下软件包:
在Amazon Linux上安装以下软件包后,
mysql_config
可用:相关问题 更多 >
编程相关推荐