2

I want to create a standalone exe containing PyQt5. I used PyInstaller and identified the folder where to find the .dll as follow:

pyinstaller --paths C:\...\Anaconda3\Library\bin --onefile --windowed test.py

The exe was created successfully and when I run the exe, the following error message appears:

enter image description here

FYI, my configuration is the following:

  • Anaconda3 4.2.0 with Python 3.5.2 (by default PyQt5 is installed via Anaconda so I never installed PyQt5 via a pip install. If I did that, a conflict appears and I can't use PyQt5 anymore).
  • Qt 3.0.1
  • .dll used have not been found in the usual folder (i.e. C:......\Anaconda3\Lib\site-packages\PyQt5) because I don't have a folder entitled "bin" in the folder PyQt5.

Thank you

H. Dave
  • 549
  • 3
  • 9
  • 26

1 Answers1

0

I found the solution. The PyQt5 installed by default with Anaconda seems corruptly in that particular situation. I uninstalled Anaconda and re-installed Python only and used pip install to install PyQt5. With this configuration, I was able to create my standalone exe.

H. Dave
  • 549
  • 3
  • 9
  • 26
  • Also, it's worth noting that PyQt5 uses Qt5. You stated you have Qt3 in your environment, which doesn't make much sense. – fredrik Jan 03 '18 at 11:07