python - Packaging with pyinstaller: PyQt4 module not found -
hi , reading. i'm packaging python code in single file using pyinstaller, when run packaged file next error:
traceback (most recent phone call last): file "<string>", line 21, in <module> file "c:\users\****\desktop\pyinstaller-2.0\pyinstaller-2.0\pyinstaller\loader\iu.py", line 409, in importhook importerror: no module named pyqt4.qtcore i don't know error telling me, since there no dir name pyinstaller-2.0 on desktop , did not utilize pyqt4 @ all.
imported modules: tkinter, tkfiledialog, tkmessagebox, multiprocessing, os, sys, time, numpy, scipy.weave, pywt, matplotlib.pyplot
i think problem related multiprocessing, since did not experience error before. used this recipe implement multiprocessing module correctly.
if using pyqt way import modules pyinstaller use
pyqt4 import qtcore, qtgui rather
import pyqt4.qtcore, pyqt4.qtgui which error implies. however, you're not using pyqt.
pyqt optional dependency of matplotlib there chance pyinstaller checking matplotlib module , consequently including pyqt.
i suggest excluding pyqt module build; in .spec file, search out line analysis class - like
analysis( ..., excludes=['pyqt4', 'pyqt4.qtcore', 'pyqt4.qtgui']) and edit excludes keyword arg suggested above.
python pyinstaller
No comments:
Post a Comment