Установите более старый MYSQL-Python на Ubunto 18.04 LTS - PullRequest
0 голосов
/ 01 апреля 2019

Я работаю из virtualenv и мне нужно установить более старый MYSQL-Python на Ubuntu 18.04 LTS.

Когда я пытаюсь

pip install MySQL-python==1.2.4

, я получаю сообщение об ошибке: Ошибка HTTP403: требуется SSL

На основании ответа где-то я пытался

pip install MySQL-python==1.2.4 -i https://pypi.python.org/simple/

Та же ошибка.

Затем я пытался с easy_install

easy_install MySQL-python==1.2.4

Ошибка: setuptools.sandbox.UnpickleableException: HTTPError ()

Я выполнил следующие команды (из virtualenv) для установки easy_install

sudo apt-get install python-setuptools
pip install --upgrade setuptools 
easy_install -U distribute

Последние две команды были где-то основаны на некоторых рекомендациях, пытаясь заставить вещи работать.

Я также попытался запустить

sudo apt-get install libmysqlclient-dev

А затем снова установить pip и easy_install.Те же ошибки.

Я могу нормально установить другие библиотеки, используя как pip install, так и easy_install

EDIT: полный вывод команды pip

$ pip install MySQL-python==1.2.4
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting MySQL-python==1.2.4
  Using cached https://files.pythonhosted.org/packages/90/5a/ce7bef80825c2188cf507baf57b37516e18dffdb198a6766a597f703059a/MySQL-python-1.2.4.zip
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-uMASQU/MySQL-python/setup.py", line 7, in <module>
        use_setuptools()
      File "distribute_setup.py", line 145, in use_setuptools
        return _do_download(version, download_base, to_dir, download_delay)
      File "distribute_setup.py", line 124, in _do_download
        to_dir, download_delay)
      File "distribute_setup.py", line 194, in download_setuptools
        src = urlopen(url)
      File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/lib/python2.7/urllib2.py", line 435, in open
        response = meth(req, response)
      File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
        'http', request, response, code, msg, hdrs)
      File "/usr/lib/python2.7/urllib2.py", line 473, in error
        return self._call_chain(*args)
      File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
        raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    urllib2.HTTPError: HTTP Error 403: SSL is required

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-uMASQU/MySQL-python/
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...