1 Reply Latest reply on Feb 2, 2016 8:16 AM by Intel_Peter

    install mySQLdb-Python Errors

    a_Monteiro

      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.

        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.

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

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

              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. Re: install mySQLdb-Python Errors
          Intel_Peter

          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.