title: Could not build an app with pyinstaller: "Cannot find existing PyQt5 plugin directories" although the app runs without problem from the script
body: <p>So I wrote a simple "hello world" app with PyQt5 and am trying to build a standalone application with <code>PyInstaller</code>. I cd the directory where the app reside and run the app with <code>python hello_world.py</code> without problem. I then tried to build the app with <code>PyInstaller hello_world.py</code> and got the following error message. What should I do?</p>
  
  <pre><code>PyInstaller hello_world.py
  46 INFO: PyInstaller: 3.4
  46 INFO: Python: 3.7.1
  46 INFO: Platform: Windows-10-10.0.15063-SP0
  93 INFO: wrote T:\app\hello_world.spec
  109 INFO: UPX is not available.
  266 INFO: Extending PYTHONPATH with paths
  ['T:\\app', 'T:\\app']
  266 INFO: checking Analysis
  266 INFO: Building Analysis because Analysis-00.toc is non existent
  266 INFO: Initializing module dependency graph...
  344 INFO: Initializing module graph hooks...
  344 INFO: Analyzing base_library.zip ...
  9250 INFO: running Analysis Analysis-00.toc
  9265 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
    required by c:\users\i0310451\appdata\local\continuum\anaconda3\python.exe
  9875 INFO: Caching module hooks...
  9890 INFO: Analyzing T:\app\hello_world.py
  10125 INFO: Loading module hooks...
  10125 INFO: Loading module hook "hook-encodings.py"...
  12094 INFO: Loading module hook "hook-pydoc.py"...
  12094 INFO: Loading module hook "hook-PyQt5.py"...
  14000 WARNING: Hidden import "PyQt5.sip" not found!
  14000 INFO: Loading module hook "hook-PyQt5.QtCore.py"...
  14062 WARNING: Unable to find Qt5 translations C:/qt64/qt_1544645195969/_h_env/Library/translations\qtbase_*.qm. These translations were not packaged.
  14062 INFO: Loading module hook "hook-PyQt5.QtWidgets.py"...
  Traceback (most recent call last):
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "C:\Users\i0310451\AppData\Local\Continuum\anaconda3\Scripts\pyinstaller.exe\__main__.py", line 9, in &lt;module&gt;
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 111, in run
      run_build(pyi_config, spec_file, **vars(args))
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
      PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
      build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
      exec(text, spec_namespace)
    File "&lt;string&gt;", line 17, in &lt;module&gt;
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 241, in __init__
      self.__postinit__()
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
      self.assemble()
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 500, in assemble
      module_hook.post_graph()
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\building\imphook.py", line 410, in post_graph
      self._load_hook_module()
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\building\imphook.py", line 377, in _load_hook_module
      self.hook_module_name, self.hook_filename)
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\compat.py", line 736, in importlib_load_source
      return mod_loader.load_module()
    File "&lt;frozen importlib._bootstrap_external&gt;", line 407, in _check_name_wrapper
    File "&lt;frozen importlib._bootstrap_external&gt;", line 907, in load_module
    File "&lt;frozen importlib._bootstrap_external&gt;", line 732, in load_module
    File "&lt;frozen importlib._bootstrap&gt;", line 265, in _load_module_shim
    File "&lt;frozen importlib._bootstrap&gt;", line 696, in _load
    File "&lt;frozen importlib._bootstrap&gt;", line 677, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 728, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\hooks\hook-PyQt5.QtWidgets.py", line 11, in &lt;module&gt;
      hiddenimports, binaries, datas = add_qt5_dependencies(__file__)
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 514, in add_qt5_dependencies
      more_binaries = qt_plugins_binaries(plugin, namespace=namespace)
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 132, in qt_plugins_binaries
      pdir = qt_plugins_dir(namespace=namespace)
    File "c:\users\i0310451\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 117, in qt_plugins_dir
      """.format(namespace, ", ".join(paths)))
  Exception:
              Cannot find existing PyQt5 plugin directories
              Paths checked: C:/qt64/qt_1544645195969/_h_env/Library/plugins
  </code></pre>