0

I have been trying to get pygame working on my mac for ages. I have been using it on a windows laptop but it is far too slow. I tried taking all the files from there and putting them into the correct location on my mac because downloading the mac versions was not working. However, I had .pyd extensions so does anyone know what they should be changed to? I tried .so and now this error is coming up:

import pygame
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/pygame/__init__.py", line 95, in <module>
    from pygame.base import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/pygame/base.so, 2): no suitable image found.  Did find:
    /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/pygame/base.so: unknown file type, first eight bytes: 0x4D 0x5A 0x90 0x00 0x03 0x00 0x00 0x00

Does anyone know how to fix this?
Thanks :)

UPDATE: I have gone through the proper route and now this error is appearing:

Traceback (most recent call last): File "", line 1, in import pygame File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/init.py", line 95, in 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

I have heard that this is due to conflicting 32bit and 64bit but I am not sure how to overcome this.. Thanks again :)

MattP272
  • 3
  • 1
  • 4
  • Although the issue is not solved for you, this has become a completely different question after your edit. Please open a new question, where you post the error, information on your python version, which Pygame you installed, and which solutions from other stackoverflow questions you have already tried, e.g. from this: http://stackoverflow.com/questions/8275808/installing-pygame-for-mac-os-x-10-6-8 – w-m Nov 16 '14 at 19:58

2 Answers2

0

Download 32-bit python and 32-bit pygame.

It worked for me and I am currently using pygame with (almost) no problems whatsoever.

SirSmokes
  • 169
  • 1
  • 1
  • 9
-1

You can not use libraries compiled for Windows (dll/pyd) on OS X. These platforms are not compatible. This can never work. You need to do a proper install of Pygame on OS X.

You can use the installer image provided on pygame.org, or install it through a package manager like MacPorts or homebrew. See for example this stackoverflow questions for a couple of ways to install Pygame on OS X.

Community
  • 1
  • 1
w-m
  • 10,772
  • 1
  • 42
  • 49