EC2实例上安装MySQL

EC2实例上安装MySQL

本文介绍了如何在Amazon Web Services EC2实例上安装MySQL-python?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AWS上创建了一个EC2实例,并使用PuTTY连接到它.
我无法使用python pip 命令安装 MySQL-python ,如下所示:
pip安装MySQL-python (通过root特权)

这是错误的控制台输出

I have a EC2 instance created on AWS and use PuTTY to connect to it.
I'm unable to install MySQL-python using python pip command as follows:
pip install MySQL-python(via root privileges)

Here is the console output of the error

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 安装其他软件包
请指导.


However I'm able to install other packages using pip
Please Guide.

推荐答案

mysql_config:

sudo yum install -y mysql-devel

这篇关于如何在Amazon Web Services EC2实例上安装MySQL-python?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 03:27