zoukankan      html  css  js  c++  java
  • 安装包模块出现的下载源问题解决:An HTTPS request has been made /Could not find a version that satisfies the requirement pyopenssl

    pip install --user --upgrade pip

    出现问题一:

    SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. 

    解决方法:pip install pyopenssl ndg-httpsclient pyasn1

    又出现问题二:

    ERROR: Could not find a version that satisfies the requirement pyopenssl (from versions: none)

    ERROR: No matching distribution found for pyopenssl

    分析
    此错误的最可能原因是:

    1.因为PyPI服务器已将您的IP地址列入黑名单,因此未响应您的请求。
    这可以通过将代理与pip一起使用来解决。请参阅解决方案。

    2.或者是因为你在运行一个旧的pip(特别是在mac上)。这可以通过升级pip来解决。

    3.这也可能是因为pypi服务器已关闭。

    解决方案
    在windows下pip配置代理,可以解决这个问题。

    点击此电脑,在最上面的的文件夹窗口输入 : %APPDATA%
    按回车跳转到目标目录,在此目录下新建pip文件夹。
    在pip文件夹下创建pip.ini文件(注意如果用记事本创建,要删除末尾的".txt")。
    打开.ini文件,输入以下内容,关闭即可(注意:源镜像可替换)。
    [global]

    imeout = 6000

    index-url = http://pypi.douban.com/simple

    trusted-host = pypi.douban.com

    国内源镜像有:

    V2EX:http://pypi.v2ex.com/simple
    豆瓣:http://pypi.douban.com/simple
    中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/simple/
    清华:https://pypi.tuna.tsinghua.edu.cn/simple

    配置好代理后,再次执行指令运行成功如下图所示。
    C:Python27Scripts>pip install pyopenssl ndg-httpsclient pyasn1

    发现成功

  • 相关阅读:
    【转】36个经典的JQuery导航菜单演示+下载
    【转】ASP.NET 3.5 开发范例精讲精析读书笔记
    【转】js弹出框详解
    【转】谈谈三层架构中MODEL的作用
    【转】制作.net实体类生成器(1)
    ASP.NET开发实战宝典.pdf配套视频源码iso| 开发实战宝典pdf和配套视频源码iso
    【转】if (!IsPostBack)
    jquery
    取web.config 连接字符串
    js接收传递过来的参数
  • 原文地址:https://www.cnblogs.com/alex-13/p/15208179.html
Copyright © 2011-2022 走看看