Pyinstaller QtCore Module import error

前端 未结 2 1757
走了就别回头了
走了就别回头了 2020-12-11 05:48

I am trying to build my app with --onefile option by pyinstaller. Here is the extract.

import sys
from PyQt4 import QtGui, QtCore
from modules.login import L         


        
相关标签:
2条回答
  • 2020-12-11 06:29

    i just had a similar problem, once i ran pyinstaller --onedir main.py, i got that error.

    i copied the Qt5core.dll in the same folder as the generated .exe to the \PyQt\bin folder and everything was working well.

    0 讨论(0)
  • 2020-12-11 06:37

    There is a bug in the current version of PyInstaller that causes this problem. See this ticket for more details.

    The good news is that it's been fixed. The bad news is that it's only arriving in PyInstaller 2.2. In the mean time, you could try installing a development build of PyInstaller to solve this issue.

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