title: PyInstaller and OpenGL Error. ImportError: cannot import name 'opengl_arrays_modules' from 'PyInstaller.utils.hooks'
body: <p>I installed the latest version of PyInstaller using this command: <code>pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip</code></p>
  <p>I try to bundle the simplest code using this command: <code>pyinstaller --onefile --noupx main.py</code></p>
  <p>main.py</p>
  <pre class="lang-py prettyprint-override"><code>from OpenGL import GL
  
  print(&quot;Hello, OpenGL&quot;)
  </code></pre>
  <p>I got this error: <code>ImportError: cannot import name 'opengl_arrays_modules' from 'PyInstaller.utils.hooks'</code></p>
  <p>Full log:</p>
  <pre><code>PS E:\_Projects\Python\SDL2\pyopengl_demo&gt; pyinstaller --onefile main.py
  124 INFO: PyInstaller: 4.0.dev0
  124 INFO: Python: 3.7.8
  138 INFO: Platform: Windows-10-10.0.18362-SP0
  140 INFO: wrote E:\_Projects\Python\SDL2\pyopengl_demo\main.spec
  283 INFO: UPX is available.
  287 INFO: Extending PYTHONPATH with paths
  ['E:\\_Projects\\Python\\SDL2\\pyopengl_demo',
   'E:\\_Projects\\Python\\SDL2\\pyopengl_demo']
  338 INFO: checking Analysis
  339 INFO: Building Analysis because Analysis-00.toc is non existent
  340 INFO: Initializing module dependency graph...
  351 INFO: Caching module graph hooks...
  401 INFO: Analyzing base_library.zip ...
  5023 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\8Observer8\\AppData\\Roaming\\Python\\Python37\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
  5039 INFO: distutils: retargeting to non-venv dir 'c:\\program files (x86)\\python37-32\\lib'
  7945 INFO: Caching module dependency graph...
  8243 INFO: running Analysis Analysis-00.toc
  8248 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
    required by c:\program files (x86)\python37-32\python.exe
  8445 INFO: Analyzing E:\_Projects\Python\SDL2\pyopengl_demo\main.py
  16293 INFO: Processing pre-find module path hook site from 'C:\\Users\\8Observer8\\AppData\\Roaming\\Python\\Python37\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
  16308 INFO: site: retargeting to fake-dir 'C:\\Users\\8Observer8\\AppData\\Roaming\\Python\\Python37\\site-packages\\PyInstaller\\fake-modules'
  18941 INFO: Processing pre-safe import module hook setuptools.extern.six.moves from 'C:\\Users\\8Observer8\\AppData\\Roaming\\Python\\Python37\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-setuptools.extern.six.moves.py'.
  24985 INFO: Processing module hooks...
  24988 INFO: Loading module hook 'hook-OpenGL.py' from 'C:\\Users\\8Observer8\\AppData\\Roaming\\Python\\Python37\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
  Traceback (most recent call last):
    File &quot;c:\program files (x86)\python37-32\lib\runpy.py&quot;, line 193, in _run_module_as_main
      &quot;__main__&quot;, mod_spec)
    File &quot;c:\program files (x86)\python37-32\lib\runpy.py&quot;, line 85, in _run_code
      exec(code, run_globals)
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\Scripts\pyinstaller.exe\__main__.py&quot;, line 7, in &lt;module&gt;
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\__main__.py&quot;, line 114, in run
      run_build(pyi_config, spec_file, **vars(args))
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\__main__.py&quot;, line 65, in run_build
      PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\build_main.py&quot;, line 716, in main
      build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\build_main.py&quot;, line 663, in build
      exec(code, spec_namespace)
    File &quot;E:\_Projects\Python\SDL2\pyopengl_demo\main.spec&quot;, line 17, in &lt;module&gt;
      noarchive=False)
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\build_main.py&quot;, line 241, in __init__
      self.__postinit__()
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\datastruct.py&quot;, line 160, in __postinit__     
      self.assemble()
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\building\build_main.py&quot;, line 418, in assemble
      self.graph.process_post_graph_hooks()
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\depend\analysis.py&quot;, line 365, in process_post_graph_hooks
      module_hook.post_graph()
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\depend\imphook.py&quot;, line 440, in post_graph
      self._load_hook_module()
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\depend\imphook.py&quot;, line 407, in _load_hook_module     
      self.hook_module_name, self.hook_filename)
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\compat.py&quot;, line 588, in importlib_load_source
      return mod_loader.load_module()
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 407, in _check_name_wrapper
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 907, in load_module
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 732, in load_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 265, in _load_module_shim
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 696, in _load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-OpenGL.py&quot;, line 24, in &lt;module&gt;
      from PyInstaller.utils.hooks import opengl_arrays_modules
  ImportError: cannot import name 'opengl_arrays_modules' from 'PyInstaller.utils.hooks' (C:\Users\8Observer8\AppData\Roaming\Python\Python37\site-packages\PyInstaller\utils\hooks\__init__.py)
  </code></pre>