[Tutor] Error message
RICHARD KENTISH
r.kentish at btinternet.com
Sun Aug 10 11:32:52 CEST 2014
Hi!
Ive installed Python 2.7.8 and pygame 1.9.1 onto a macbook pro 10.9.4 Mavericks.
The code is taken direct from the 'making games' book. Here it is pasted from idle:
import pygame, sys
from pygame.locals import *
pygame.init()
displaysurf = pygame.dispaly.set_mode((400, 300))
pygame.display.set_caption('Hello World!')
while True: # main game loop
for event in pygame.event.get():
if event.type == quit:
pygame.quit()
sys.exit()
pygame.display.update()
Here is the error I am getting.
Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
Traceback (most recent call last):
File "/Users/richardkentish/Desktop/Python resources/blankgame.py", line 1, in <module>
import pygame, sys
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py", line 95, in <module>
from pygame.base import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper
Thanks for your help.
Best wishes,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140810/ade9b87b/attachment.html>
More information about the Tutor
mailing list