-1

I'm very new to python and when i tried to install some lib it is giving me this issue. can you please help on what to do.

When trying to install ssl using pip command it is giving me the below error

"pip install 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.
ForRace
  • 96
  • 7
user1600493
  • 1
  • 1
  • 1
  • SSL module is old (2013 last release) so SSL module is for python 2.x (by problem with print without parentheses in error). More here: https://github.com/pypa/pip/issues/6020 – Geekmoss Aug 22 '19 at 12:19
  • 2
    Install `pyopenssl` instead – Kostas Charitidis Aug 22 '19 at 12:25
  • 1
    I addition you can try installing using python 3 installer: `python3 -m pip install ssl` or `pip3 install ssl` – Daniel Nudelman Aug 22 '19 at 12:26
  • 1
    Possible duplicate of [Having trouble installing ssl on PC using pip install](https://stackoverflow.com/questions/56135959/having-trouble-installing-ssl-on-pc-using-pip-install) – phd Aug 22 '19 at 12:59
  • https://stackoverflow.com/search?q=%5Bpip%5D+%22install+ssl%22+SyntaxError – phd Aug 22 '19 at 12:59

1 Answers1

2

long story short, don't install that python package. It's deprecated (shouldn't be installed in Python 2.6 and newer) and your python already includes ssl package.

In general you shouldn't even be able to install it via pip, but I guess that it's so old that setup.py didn't support version restrictions in the same way it does now.

MacHala
  • 2,159
  • 1
  • 15
  • 18