zoukankan      html  css  js  c++  java
  • pip或easy_install安装库报错:SSL: CERTIFICATE_VERIFY_FAILED

      使用pip和easy_install安装那个lxml、pyspider这些库或者框架一直提示以下错误:

    Collecting pyspider
      Could not fetch URL https://pypi.python.org/simple/pyspider/: There was a prob
    lem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate
     verify failed (_ssl.c:661) - skipping
      Could not find a version that satisfies the requirement pyspider (from version
    s: )
    No matching distribution found for pyspider
    Searching for pyspider
    Reading https://pypi.python.org/simple/pyspider/
    Download error on https://pypi.python.org/simple/pyspider/: [SSL: CERTIFICATE_VE
    RIFY_FAILED] certificate verify failed (_ssl.c:661) -- Some packages may not be
    found!
    Couldn't find index page for 'pyspider' (maybe misspelled?)
    Scanning index of all packages (this may take a while)
    Reading https://pypi.python.org/simple/
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAIL
    ED] certificate verify failed (_ssl.c:661) -- Some packages may not be found!
    No local packages or working download links found for pyspider
    error: Could not find suitable distribution for Requirement.parse('pyspider')

      错误原因:SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:661)

      解决办法:

    # 1.pip install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org pythonPackageName
    # 2.pip --trusted-host pypi.python.org install pythonPackageName

      以上两种命令都行,其中 "pythonPackageName" 是你要安装的库名称(比如:requests、lxml等)

  • 相关阅读:
    利用js在Table中追加数据
    C#API配置跨域
    C#linq查询DataTable
    erlang格式化输出
    erlang 的源代码保护机制
    MP3格式音频文件结构解析
    使用异步 I/O 大大提高应用程序的性能
    虚拟机安装mac 关键是换引导
    C/C++规则整理
    字节对齐
  • 原文地址:https://www.cnblogs.com/zengguowang/p/8399332.html
Copyright © 2011-2022 走看看