amazon-ec2 amazon-web-services mysql python

How to install MySQL-python on Amazon Web Services EC2 instance?

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
Complete output from command python 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/", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-JGbAEI/MySQL-python/", line 43, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-JGbAEI/MySQL-python/", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Command "python egg_info" failed with error code 1 in /tmp/pip-build-JGbAEI/MySQL-python

However I’m able to install other packages using pip

Please Guide.