zoukankan      html  css  js  c++  java
  • 关于 pip安装的可能错误的排除

    今天安装selenium总是报错(下为错误信息)

    C:Python27Scripts>pip install selenium
    Collecting selenium
    C:Python27libsite-packagespip-10.0.0b2-py2.7.eggpip\_vendorurllib3utilss
    l_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subje
    ct Name Indication) extension to TLS is not available on this platform. This may
    cause the server to present an incorrect TLS certificate, which can cause valid
    ation failures. You can upgrade to a newer version of Python to solve this. For
    more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.ht
    ml#ssl-warnings
    SNIMissingWarning
    C:Python27libsite-packagespip-10.0.0b2-py2.7.eggpip\_vendorurllib3utilss
    l_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. T
    his prevents urllib3 from configuring SSL appropriately and may cause certain SS
    L connections to fail. You can upgrade to a newer version of Python to solve thi
    s. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-u
    sage.html#ssl-warnings
    InsecurePlatformWarning
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
    after connection broken by 'SSLError(SSLError(1, '_ssl.c:507: error:1407742E:SS
    L routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/sel
    enium/
    C:Python27libsite-packagespip-10.0.0b2-py2.7.eggpip\_vendorurllib3utilss
    l_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. T
    his prevents urllib3 from configuring SSL appropriately and may cause certain SS
    L connections to fail. You can upgrade to a newer version of Python to solve thi
    s. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-u
    sage.html#ssl-warnings
    InsecurePlatformWarning
    Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
    after connection broken by 'SSLError(SSLError(1, '_ssl.c:507: error:1407742E:SS
    L routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/sel
    enium/
    C:Python27libsite-packagespip-10.0.0b2-py2.7.eggpip\_vendorurllib3utilss
    l_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. T
    his prevents urllib3 from configuring SSL appropriately and may cause certain SS
    L connections to fail. You can upgrade to a newer version of Python to solve thi
    s. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-u
    sage.html#ssl-warnings
    InsecurePlatformWarning
    Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None))
    after connection broken by 'SSLError(SSLError(1, '_ssl.c:507: error:1407742E:SS
    L routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/sel
    enium/
    C:Python27libsite-packagespip-10.0.0b2-py2.7.eggpip\_vendorurllib3utilss
    l_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. T
    his prevents urllib3 from configuring SSL appropriately and may cause certain SS
    L connections to fail. You can upgrade to a newer version of Python to solve thi
    s. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-u
    sage.html#ssl-warnings
    InsecurePlatformWarning
    Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))
    after connection broken by 'SSLError(SSLError(1, '_ssl.c:507: error:1407742E:SS
    L routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/sel
    enium/
    C:Python27libsite-packagespip-10.0.0b2-py2.7.eggpip\_vendorurllib3utilss
    l_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. T
    his prevents urllib3 from configuring SSL appropriately and may cause certain SS
    L connections to fail. You can upgrade to a newer version of Python to solve thi
    s. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-u
    sage.html#ssl-warnings
    InsecurePlatformWarning
    Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
    after connection broken by 'SSLError(SSLError(1, '_ssl.c:507: error:1407742E:SS
    L routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/sel
    enium/
    C:Python27libsite-packagespip-10.0.0b2-py2.7.eggpip\_vendorurllib3utilss
    l_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. T
    his prevents urllib3 from configuring SSL appropriately and may cause certain SS
    L connections to fail. You can upgrade to a newer version of Python to solve thi
    s. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-u
    sage.html#ssl-warnings
    InsecurePlatformWarning
    Could not fetch URL https://pypi.python.org/simple/selenium/: There was a prob
    lem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org',
    port=443): Max retries exceeded with url: /simple/selenium/ (Caused by SSLError(
    SSLError(1, '_ssl.c:507: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv
    1 alert protocol version'),)) - skipping
    Could not find a version that satisfies the requirement selenium (from version
    s: )
    No matching distribution found for selenium
    C:Python27libsite-packagespip-10.0.0b2-py2.7.eggpip\_vendorurllib3utilss
    l_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. T
    his prevents urllib3 from configuring SSL appropriately and may cause certain SS
    L connections to fail. You can upgrade to a newer version of Python to solve thi
    s. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-u
    sage.html#ssl-warnings
    InsecurePlatformWarning
    Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem con
    firming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=44
    3): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1,
    '_ssl.c:507: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert prot
    ocol version'),)) - skipping

    可以解决问题的解决方法:

    此情况只用于网络不畅的安装模块背景:

    总出现红色的

    Could not find a version that satisfies the requirement pymongo(from version:)

    你可能会遇到下面这样的情况:

    是因为网络的问题,要使用国内的镜像源来加速

    解决办法:

    你需要的是在你的命令行下面添加一句

    例如:原本执行的命令是:

    pip install selenium

    改为:

    pip install selenium -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

    结果会就成功:

    ok!问题解决!

  • 相关阅读:
    老男孩Python28期班学习笔记day1
    Apache Torque
    管理和维护RHCS集群
    Email邮件服务的搭建(postfix on rhel7.2)
    DS4700控制器重启原因分析
    读懂系统路由表
    一条看不懂的多路径
    基于Vmware-ESXi5.1实验RHCS虚拟Fence设备(一)
    RedHat 6.7 Enterprise x64环境下使用RHCS部署Oracle 11g R2双机HA
    rhcs相关实战教程
  • 原文地址:https://www.cnblogs.com/mabingxue/p/8872365.html
Copyright © 2011-2022 走看看