Python SSL Import Error in PyInstaller generated executable

前端 未结 1 1192
有刺的猬
有刺的猬 2021-01-06 19:45

I\'m trying to distribute an executable file of a Python program I\'ve created. For this purpose I\'m using PyInstaller .

I use Windows 7 Professional with Python 3.

相关标签:
1条回答
  • 2021-01-06 19:47

    So after a couple of hours, I managed to solve the problem. I did several things and still unsure what was the actuall fix, but this is the step-by-step flow I've done:

    1. Created a new environment using Anaconda. I've downgraded the Python version to 3.6.8, since I saw mentions of several compatibility problems with Python 3.7
    2. Installed all the requirements from my project, using Anaconda, since some mention problems due to mixed usage of pip and conda.
    3. Installed the latest version of pyinstaller.
    4. Activated the new environment and run pyinstaller from within it on the main.py script of the program with --hidden-import pyodbc argument.

    That's it, now the distibuted program works on all Windows computers in the office.

    0 讨论(0)
提交回复
热议问题