title: How to fix "WARNING: Hidden import "pygame._view" not found!" when converting .py to .exe using PyInstaller?
body: <p>This is the MRE of my code:</p>
  <pre><code>import pygame
  
  pygame.init()
  screen = pygame.display.set_mode((800, 600))
  screen.fill((255, 215, 0))
  
  x_coordinate = 330
  y_coordinate = 250
  font = pygame.font.SysFont('comicsans', 30, False, False)
  writing = font.render(&quot;this is a test&quot;, 1, (0,0,0))
  
  
  running = True
  while running:
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              running = False
          if event.type == pygame.KEYDOWN:
              screen.blit(writing,(x_coordinate, y_coordinate))
      pygame.display.update()
  pygame.quit()
  </code></pre>
  <p>Now, when I run this using cmd or IDLE, it runs perfectly. But when I make its executable (the command I used was &quot;pyinstaller --onefile {name of python file}&quot;) using pyinstaller, there appears a warning on the cmd window: &quot;WARNING: Hidden import &quot;pygame._view&quot; not found!&quot; I thought that pygame._view is a different module than pygame, so I added <code>import pygame._view</code> to no avail (I also tried to install it using pip, but no module exists by that name).</p>
  <p>Now, when I run the executable created, I get an error message which says, &quot;test.exe has stopped working&quot;.</p>
  <p>How do I fix this problem?</p>