I’m getting below error when trying to run the python scripts via crontab. It works when running it manually.
File python3.11/lib/python3.11/smtplib.py", line 776, in starttls
raise RuntimeError(“No SSL support included in this Python”)
RuntimeError: No SSL support included in this Python
Weird thing is it works when i try to set the python path in crontab to /usr/bin/python3.6 instead of /opt/python3.11.1/python3.11/bin/python3.11. by the way script is for sending email report.
What do you get from /opt/python3.11.1/python3.11/bin/python3.11 -c 'import ssl;print(ssl)'?
From that path, it looks like you built your own Python. Note that as far as the build process is concerned, ssl is an optional module, and there’s just a note at the end of the build output to alert you to the fact that the _ssl extension module required by ssl didn’t build if ./configure couldn’t find usable OpenSSL headers and libraries.