пытается pip установить MySQL-python в среде 2.7 - PullRequest
0 голосов
/ 26 августа 2018

Когда я пытаюсь установить MySQL-python с помощью pip, я получаю следующую ошибку:

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/

Я провел исследование, и ни одно из решений для других людей не работает для меня.Я уже обновил мои setuptools и pip до текущей версии.

...