在pip3安装上SSL:CERTIFICATE_VERIFY_FAILED

时间:2015-10-27 21:52:09

标签: python python-3.x pip ssl-certificate

我正在研究一个谷歌环聊机器人(https://github.com/hangoutsbot/hangoutsbot)的分支,一切都运行良好,有一天它只是在我做pip3 install -r requirements.txt时才会收到这个回复:< / p>

Collecting      git+https://github.com/tdryer/hangups.git@84c6a20a24bede2fa41ffd54fda510e453f080dc (from -r requirements.txt (line 1))
  Cloning https://github.com/tdryer/hangups.git (to 84c6a20a24bede2fa41ffd54fda510e453f080dc) to /var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-u4xqord7-build
  Could not find a tag or branch '84c6a20a24bede2fa41ffd54fda510e453f080dc', assuming commit.
Collecting git+https://github.com/loisaidasam/pyslack.git (from -r requirements.txt (line 11))
  Cloning https://github.com/loisaidasam/pyslack.git to /var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-h_umecx8-build
Collecting git+https://github.com/carpedm20/emoji (from -r requirements.txt (line 12))
  Cloning https://github.com/carpedm20/emoji to /var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-pfzs28ru-build
Collecting appdirs (from -r requirements.txt (line 2))
  Using cached appdirs-1.4.0-py2.py3-none-any.whl
Collecting asyncio (from -r requirements.txt (line 3))
  Using cached asyncio-3.4.3-py3-none-any.whl
Collecting jsonrpclib-pelix (from -r requirements.txt (line 4))
  Using cached jsonrpclib_pelix-0.2.6-py2.py3-none-any.whl
Collecting pushbullet.py (from -r requirements.txt (line 5))
  Using cached pushbullet.py-0.8.1-py2.py3-none-any.whl
Collecting beautifulsoup4 (from -r requirements.txt (line 6))
  Using cached beautifulsoup4-4.4.1-py3-none-any.whl
Collecting goslate (from -r requirements.txt (line 7))
  Using cached goslate-1.5.0.tar.gz
Collecting wikipedia (from -r requirements.txt (line 8))
  Using cached wikipedia-1.4.0.tar.gz
Collecting wolframalpha (from -r requirements.txt (line 9))
  Using cached wolframalpha-1.2.zip
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/pytest-runner/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646) -- Some packages may not be found!
    Couldn't find index page for 'pytest-runner' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:646) -- Some packages may not be found!
    No local packages or download links found for pytest-runner
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-build-9h1wp8sf/wolframalpha/setup.py", line 30, in <module>
        setuptools.setup(**setup_params)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/dist.py", line 268, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
        replace_conflicting=True,
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 836, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1081, in best_match
        return self.obtain(req, installer)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1093, in obtain
        return installer(requirement)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 632, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/x7/cr79fr9n0hs3n7bl5vxyz0s00000gn/T/pip-build-9h1wp8sf/wolframalpha

我是Python新手,不知道发生了什么。在此先感谢您的帮助

1 个答案:

答案 0 :(得分:0)

问题是RPI的日期尝试覆盆子:

$ sudo date -s "2016-11-02 $(date +%H:%M:%S)"
相关问题