无法使用pip install ss在本地系统中安装ssl

2024-03-28 23:46:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我对python很陌生,当我尝试安装一些lib时,它给了我这个问题。你能帮我做什么吗。

当尝试使用pip命令安装ssl时,它给了我以下错误

“pip安装ssl”

Collecting ssl
  Using cached https://files.pythonhosted.org/packages/83/21/f469c9923235f8c36d5fd5334ed11e2681abad7e0032c5aba964dcaf9bbb/ssl-1.16.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\rajesh_navaneeth\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\setup.py'"'"'; __file__='"'"'C:\\Users\\RAJESH~1\\AppData\\Local\\Temp\\pip-install-ag0q6n7p\\ssl\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\RAJESH~1\AppData\Local\Temp\pip-install-ag0q6n7p\ssl\setup.py", line 33
        print 'looking for', f
                          ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Tags: installpippyinfosslegglocalsetup
1条回答
网友
1楼 · 发布于 2024-03-28 23:46:20

长话短说,不要安装python包。它已被弃用(不应该安装在Python2.6和更新版本中),而且您的Python已经包含了ssl包。在

一般来说,你甚至不应该通过pip来安装它,但是我想它太老了以至于设置.py没有像现在一样支持版本限制。在

相关问题 更多 >