install在PC上安装SSL时遇到问题

install在PC上安装SSL时遇到问题

本文介绍了使用pip install在PC上安装SSL时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在PC上安装SSL,但是我仍然遇到如下错误……我知道这应该是一件快速而简单的事情-我在这里是否缺少真正的基本知识?我曾尝试升级我的pip,upgradeh setuptools,但似乎无济于事-任何帮助将不胜感激.

I'm trying to install SSL on my PC, but i keep on getting an error as follows... I know this should be a quick and easy thing - am i missing something really basic here? I tried upgrading my pip, upgradingh setuptools, but nothing seems to work - any help would be greatly appreciated.

C:\Users\Michael\PycharmProjects\py4e>pip3 install ssl
Collecting ssl
  Using cached https://files.pythonhosted.org/packages/83/21/f469c9923235f8c36d5
fd5334ed11e2681abad7e0032c5aba964dcaf9bbb/ssl-1.16.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\MICHAE~1\AppData\Local\Temp\pip-install-qtieo4so\ssl\setup.
py", line 33
        print 'looking for', f
                          ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print('loo
king for', f)?
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\M
ICHAE~1\AppData\Local\Temp\pip-install-qtieo4so\ssl\

推荐答案

鉴于该错误,看来您的Python可执行文件是Python 3.x(要求使用括号括起来的print语句),但文件execute适用于Python2.x.这可能意味着您需要将pip升级到Python 3(您可能已经将其升级为pip3;即,尝试运行pip3 install ssl).

Given the error, it appears that your Python executable is Python 3.x (which requires print statements to be called with parentheses), but the file being executed is intended for Python 2.x. That likely means you need to upgrade your pip to Python 3 (you may already have it as pip3; i.e., try running pip3 install ssl).

PyPi信息库中的ssl软件包似乎仅支持Python 2( https://pypi .org/project/ssl/),但ssl库已内置到Python 3中( https://docs.python.org/3.4/library/ssl.html )

It appears that the ssl package in the PyPi repository only supports Python 2 (https://pypi.org/project/ssl/), but ssl library is built into Python 3 (https://docs.python.org/3.4/library/ssl.html)

这篇关于使用pip install在PC上安装SSL时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 10:05