Search code examples
pythonpippsycopg2gevent

HTTP Error 403: SSL is required on trying to install gevent-psycopg2 with pip


While trying to install gevent-psycopg2 using pip On linux Using this command:

pip install gevent-psycopg2
I got this error

Collecting gevent-psycopg2
  Using cached https://files.pythonhosted.org/packages/72/11/aa122be6a3bdbc7d16752c5e6771b362ca7ebaef0f52113e036062dd2c12/gevent-psycopg2-0.0.3.tar.gz
    Complete output from command python setup.py egg_info:
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz
    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-install-q1DRBs/gevent-psycopg2/setup.py", line 5, in 
        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 193, 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-q1DRBs/gevent-psycopg2/
  • I already upgraded pip to 19.0.3 , and my python version is 2.7.12+
  • I tried to download the archive from git and to install it using setup.py but i end up with a similar error.
  • I also already tried to install using git with
pip install git+git:https://github.com/zacharyvoase/gevent-psycopg2

I dont know what i'm missing? Or is there another way to install from source?

Thanks


Solution

  • The project seems to be at the early stage of development (version 0.0.3) but already abandoned (last release in 2012). The installation code uses distribute which it tries to download from http://pypi.python.org/packages/source/d/distribute/; even if the code succeeded connecting to the site it would receive error 404.

    At the git repository there is the hint: "Obsolete; use https://bitbucket.org/dvarrazzo/psycogreen/ instead." The named package seems to be much more elaborated (version 1.0.1) and fresh (Dec 2018). So start with

    pip install psycogreen