美文网首页
Macbook pro使用pip安装第三方库时报错“No mat

Macbook pro使用pip安装第三方库时报错“No mat

作者: an鑫_wolfxin2010 | 来源:发表于2018-06-14 11:51 被阅读0次

    如何背单词永不遗忘?暴暴暴暴暴暴涨38000单词量的秘诀-->科学记忆法

    在Mac OS X 下,本人使用pip安装第三方库(qqbot)时出现报错,内容如下:

    macdeMacBook-Pro:~ mac$ pip install qqbot
    错误提示:
    Collecting qqbot
      Could not fetch URL https://pypi.python.org/simple/qqbot/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:719) - skipping
      Could not find a version that satisfies the requirement qqbot (from versions: )
    No matching distribution found for qqbot

    经过了解是需要对pip进行升级到最新版本,方可使用pip命令,解决简单步骤如下:

    1、下载 get-pip.py

    curl https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py

    2、执行升级pip

    sudo python /tmp/get-pip.py
    以上命令运行,会提示成功提示消息:
    Collecting pip
      Using cached https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl
    Collecting wheel
      Using cached https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl
    Installing collected packages: pip, wheel
      Found existing installation: pip 9.0.1
        Uninstalling pip-9.0.1:
          Successfully uninstalled pip-9.0.1
    Successfully installed pip-10.0.1 wheel-0.31.1

    相关文章

      网友评论

          本文标题:Macbook pro使用pip安装第三方库时报错“No mat

          本文链接:https://www.haomeiwen.com/subject/fbaeeftx.html