pyqt - PyInstaller cannot find pyqt4 plugin directories -
i have pyqt application trying compile 1 exe using pyinstaller 3.1. compile exe, however, gui doesn't show upon launch (clicking exe). 1 of compilation message is:
importerror: no module named site 5576 error: cannot find pyqt4 plugin directories 5576 warning: hidden import 'pyqt4._qt' not found (probably old hook)
i think why ui wouldn't show up. i've add of paths has pyqt4 in pathex attribute analysis object no avail. below spec file:
# -*- mode: python -*- block_cipher = none = analysis(['main32.py'], pathex=['c:/osgeo4w/apps/python27/lib/site-packages/pyqt4','./src'], binaries=none, datas=none, hiddenimports=[], hookspath=none, runtime_hooks=none, excludes=none, win_no_prefer_redirects=none, win_private_assemblies=none, cipher=block_cipher) pyz = pyz(a.pure, a.zipped_data, cipher=block_cipher) exe = exe(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name='myexe', debug=false, strip=none, upx=true, console=false )
any ideas what's next try?
i had same error, , did solve doing this:
uninstalling pyqt4("pip uninstall pyqt4" on cmd);
deleting "pyqt4" folder @ "...pythonx\lib\site-packages\";
downloading ".whl" package site: python expansion packages, you need download right whl, name of file, since im using python3.5, file "pyqt4‑4.11.4‑cp35‑none‑win32.whl" worked me!
installing again, opening cmd @ file's location , typing: "pip install pyqt4‑4.11.4‑cp35‑none‑win32.whl". of course you'll type file's name.
note: uninstalling, compile script. if using pyqt4 code, gonna need install again. please, thumbs if worked too! ;)
Comments
Post a Comment