USEPA / SWMM-EPANET_User_Interface

User interface for the Stormwater-Management-Model
111 stars 67 forks source link

Error creating installation package for SWMM #403

Closed barrc closed 4 years ago

barrc commented 4 years ago

I am following the instructions here: https://github.com/USEPA/SWMM-EPANET_User_Interface/wiki/Create-Installation-Package-for-Windows-10-(python-3-Qt-5-version), using current dev-ui-py3qt5.

I installed pyinstaller, then removed the files listed in step b. When I got to the step

pyinstaller --clean frmMainSWMM_py3qt5.spec

it failed with this traceback:

149304 INFO: Loading module hook "hook-PyQt5.QtGui.py"...
Traceback (most recent call last):
  File "C:\OSGeo4W64\apps\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\OSGeo4W64\apps\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\OSGeo4W64\apps\Python37\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 681, in build
    exec(code, spec_namespace)
  File "frmMainSWMM_py3qt5.spec", line 20, in <module>
    cipher=block_cipher)
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 244, in __init__
    self.__postinit__()
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
    self.assemble()
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 422, in assemble
    self.graph.process_post_graph_hooks()
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\depend\analysis.py", line 311, in process_post_graph_hooks
    module_hook.post_graph()
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\depend\imphook.py", line 417, in post_graph
    self._load_hook_module()
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\depend\imphook.py", line 384, in _load_hook_module
    self.hook_module_name, self.hook_filename)
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\compat.py", line 797, in importlib_load_source
    return mod_loader.load_module()
  File "<frozen importlib._bootstrap_external>", line 407, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 907, in load_module
  File "<frozen importlib._bootstrap_external>", line 732, in load_module
  File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\hooks\hook-PyQt5.QtGui.py", line 13, in <module>
    hiddenimports, binaries, datas = add_qt5_dependencies(__file__)
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 542, in add_qt5_dependencies
    more_binaries = qt_plugins_binaries(plugin, namespace=namespace)
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 149, in qt_plugins_binaries
    pdir = qt_plugins_dir(namespace=namespace)
  File "C:\OSGeo4W64\apps\Python37\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 134, in qt_plugins_dir
    """.format(namespace, ", ".join(paths)))
Exception:
            Cannot find existing PyQt5 plugin directories
            Paths checked:
barrc commented 4 years ago

@TongZhai this is the issue I had when I tried to build the installation package. It sounded like you may have run into a similar issue in the past -- any advice?

PaulDudaRESPEC commented 4 years ago

This is the symptom caused by having PyInstaller v3.6. As noted in the wiki page "Create Installation Package for Windows 10 (python 3 Qt 5 version)", updated April 1, 2020:

*Note, PyInstaller 3.6 did not work successfully in this process -- possibly due to a bug in that version -- but PyInstaller 3.4 works, so that is the recommended version."