hbokmann / Pacman

Pacman in Python with PyGame
125 stars 172 forks source link

Import error #5

Open Seggan opened 5 years ago

Seggan commented 5 years ago

When running, I get this: ImportError: No module named pygame._view

poetem commented 5 years ago

+1

josejich commented 4 years ago

Had the same issue, I fix it adding the following change to it:

diff --git a/pacman.py b/pacman.py
index 022bf6d..635bd8f 100644
--- a/pacman.py
+++ b/pacman.py
@@ -1,7 +1,9 @@
 #Pacman in Python with PyGame
 #https://github.com/hbokmann/Pacman

-import pygame._view
+import pygame
+
+from pygame import *

 black = (0,0,0)
 white = (255,255,255)
vaibhavk1103 commented 3 years ago

I'm using Python 3.9 if you just use from pygame import * it works fine.

Bhargavaa1 commented 3 years ago

import pygame works for version 2.7.16

DracFiendMG commented 2 years ago

I'm using Python 3.9 if you just use from pygame import * it works fine.

It works fine until I quit the game.

pygame.error: display Surface quit

it shows this error