0

So I am trying to bundle a python 3.7 script that uses requests into a py2app application. When I attempt to run the application, it throws this error:

requests.exceptions.SSLError: HTTPSConnectionPool(host='www.instagram.com', port=443):                       
Max retries exceeded with url: /p/CCGpCZ0FAib/ (Caused by SSLError("Can't connect to HTTPS URL 
because the SSL module is not available."))

I can see this is caused because it cannot locate the SSL module, I have already attempted to add 'requests' into both the 'includes' section and 'packages' section in the setup.py. I have also tried directly add 'SSL' to both the 'includes' and 'packages' sections and that did not work either. Any Ideas on how to fix this?

  • check documentation - it should have config file which lets you add manually missing elements. it can need some C/C++ libray which is not part of Python (ie. `OpenSSL`). BTW: `pyinstaller` has [spec file](https://pyinstaller.readthedocs.io/en/stable/spec-files.html) for this. – furas Jul 02 '20 at 01:48
  • probably duplicate [SSLError in Requests when packaging as OS X .app](https://stackoverflow.com/questions/17072124/sslerror-in-requests-when-packaging-as-os-x-app) – furas Jul 02 '20 at 01:52

0 Answers0