0

When I try to install MySQL-python with pip, I get the following error.

Oreos-MacBook-Pro:~ oreosmoreo$ pip install mysql-python
Collecting mysql-python
/Users/oreosmoreo/.pyenv/versions/2.7/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:369: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server 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. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
/Users/oreosmoreo/.pyenv/versions/2.7/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
  Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/6k/gq07lqd9613313s4s5yyn64w0000gn/T/pip-install-H992H_/mysql-python/setup.py", line 17, in <module>
        metadata, options = get_config()
      File "setup_posix.py", line 53, in get_config
        libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ]
      File "setup_posix.py", line 8, in dequote
        if s[0] in "\"'" and s[0] == s[-1]:
    IndexError: string index out of range

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/6k/gq07lqd9613313s4s5yyn64w0000gn/T/pip-install-H992H_/mysql-python/

I've done research and none of the solutions for other people work for me. I've already updated my setuptools and pip to current.

phd
  • 82,685
  • 13
  • 120
  • 165
  • Please post the complete error trace. – hoefling Aug 26 '18 at 14:54
  • 2
    Possible duplicate of ['pip install MySQL-python' fails with 'IndexError'](https://stackoverflow.com/questions/43543483/pip-install-mysql-python-fails-with-indexerror) – phd Aug 26 '18 at 23:10
  • https://stackoverflow.com/search?q=%5Bmysql-python%5D+IndexError%3A+string+index+out+of+range – phd Aug 26 '18 at 23:10

0 Answers0