Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AMont11
New Contributor I
1,175 Views

install mySQLdb-Python Errors

Jump to solution

hi all,

I am trying to install mysql module for python with pip however I am getting the following errors :

root@edison:~# pip install MySQL-python

Collecting MySQL-python

/usr/lib/python2.7/site-packages/pip-8.0.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html# snimissingwarning https://urllib3.readthedocs.org/en/latest/security.html# snimissingwarning.

SNIMissingWarning

/usr/lib/python2.7/site-packages/pip-8.0.2-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html# insecureplatformwarning https://urllib3.readthedocs.org/en/latest/security.html# insecureplatformwarning.

InsecurePlatformWarning

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 "", line 1, in

File "/tmp/pip-build-YYEv1x/MySQL-python/setup.py", line 17, in

metadata, options = get_config()

File "/tmp/pip-build-YYEv1x/MySQL-python/setup_posix.py", line 43, in get_config

libs = mysql_config("libs_r")

File "/tmp/pip-build-YYEv1x/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-YYEv1x/MySQL-python

can someone please let me know how i can install this module? I am getting this exact error when i try to install other modules too, why is this >?

1 Solution
Pedro_M_Intel
Employee
92 Views

Hello a_Monteiro,

I was reading some posts online about the same issue and according to them it was because of the dependencies libmysqlclient-dev and python-dev. However, I installed them both and even though the error changed, I still couldn't install it so I installed the following packages and I was able to install MySQL-python with the pip command:

libmysqlclient-dbg

libmysqlclient-r

libmysqlclient-r-dev

libmysqlclient-r-staticdev

libmysqlclient-staticdev

libmysqlclient18

libmysqld-dev

libmysqlclient-dev

libmysqld18

Peter.

View solution in original post

1 Reply
Pedro_M_Intel
Employee
93 Views

Hello a_Monteiro,

I was reading some posts online about the same issue and according to them it was because of the dependencies libmysqlclient-dev and python-dev. However, I installed them both and even though the error changed, I still couldn't install it so I installed the following packages and I was able to install MySQL-python with the pip command:

libmysqlclient-dbg

libmysqlclient-r

libmysqlclient-r-dev

libmysqlclient-r-staticdev

libmysqlclient-staticdev

libmysqlclient18

libmysqld-dev

libmysqlclient-dev

libmysqld18

Peter.

View solution in original post

Reply