title: pyinstaller : AttributeError: module 'enum' has no attribute 'IntFlag'
body: <p>I made a program using pyqt4. I tried to create an executable file through pyinstaller. But I failed and I continued to search for the reason.
  Finally, I found that the pyinstaller does not support pyqt4. So I installed pyqt5 and changed the code to pyqt5.
  The pyinstaller, however, still caused errors and to some extent solved the problem. I even erased pyqt4.
  But I still have not solved the problem below.</p>
  
  <p><strong>AttributeError: module 'enum' has no attribute 'IntFlag'</strong></p>
  
  <p><strong>And it is trackback</strong></p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;string&gt;", line 2, in &lt;module&gt;
  ModuleNotFoundError: No module named 'sip'
  Traceback (most recent call last):
    File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts\pyinstaller-script.py", line 11, in &lt;module&gt;
      load_entry_point('PyInstaller==3.4.dev0+ab8fd9753', 'console_scripts', 'pyinstaller')()
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\__main__.py", line 94, in run
      run_build(pyi_config, spec_file, **vars(args))
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
      PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\building\build_main.py", line 791, in main
      build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\building\build_main.py", line 737, in build
      exec(text, spec_namespace)
    File "&lt;string&gt;", line 16, in &lt;module&gt;
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\building\build_main.py", line 213, in __init__
      self.__postinit__()
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\building\datastruct.py", line 161, in __postinit__
      self.assemble()
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\building\build_main.py", line 472, in assemble
      module_hook.post_graph()
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\building\imphook.py", line 410, in post_graph
      self._load_hook_module()
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\building\imphook.py", line 377, in _load_hook_module
      self.hook_module_name, self.hook_filename)
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\compat.py", line 744, in importlib_load_source
      return mod_loader.load_module()
    File "&lt;frozen importlib._bootstrap_external&gt;", line 399, in _check_name_wrapper
    File "&lt;frozen importlib._bootstrap_external&gt;", line 823, in load_module
    File "&lt;frozen importlib._bootstrap_external&gt;", line 682, in load_module
    File "&lt;frozen importlib._bootstrap&gt;", line 265, in _load_module_shim
    File "&lt;frozen importlib._bootstrap&gt;", line 684, in _load
    File "&lt;frozen importlib._bootstrap&gt;", line 665, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 678, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\hooks\hook-PyQt5.QtCore.py", line 15, in &lt;module&gt;
      binaries = qt_plugins_binaries('codecs', namespace='PyQt5')
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 65, in qt_plugins_binaries
      pdir = qt_plugins_dir(namespace=namespace)
    File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\PyInstaller\utils\hooks\qt.py", line 39, in qt_plugins_dir
      raise Exception('Cannot find {0} plugin directories'.format(namespace))
  Exception: Cannot find PyQt5 plugin directories
  </code></pre>
  
  <p>Thank you~</p>