HTTP错误403:尝试使用pip安装gevent-psycopg2时需要SSL

问题描述 投票:0回答:1

尝试使用pip在linux上安装gevent-psycopg2时使用此命令:

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/
  • 我已经将pip升级到19.0.3,我的python版本是2.7.12+
  • 我试图从git下载存档并使用setup.py安装它,但我最终得到了类似的错误。
  • 我也已经尝试使用git进行安装
pip install git+git:https://github.com/zacharyvoase/gevent-psycopg2

我不知道我错过了什么?或者是否有另一种从源代码安装的方法?

谢谢

python pip psycopg2 gevent
1个回答
1
投票

The project似乎处于开发的早期阶段(版本0.0.3),但已经放弃(2012年最后一次发布)。它试图从uses distribute下载的安装代码http://pypi.python.org/packages/source/d/distribute/;即使代码成功连接到站点,它也会收到错误404。

the git repository有提示:“已过时;请改用https://bitbucket.org/dvarrazzo/psycogreen/。” The named package似乎更精致(版本1.0.1)和新鲜(2018年12月)。所以从一开始

pip install psycogreen
© www.soinside.com 2019 - 2024. All rights reserved.