Reputation: 11
I think I have downloaded pygame wrong. Whenever I try to import and initialize it I always get this error:
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
Can someone explain what this is?
Upvotes: 0
Views: 648
Reputation: 898
It looks like you are trying to install Pygame against the OS X included version of Python. This is a bad idea for several reasons:
For this reason, it is highly recommended that you set up a development environment with a separate, fresh install of Python. The easiest way to do this is with Homebrew, although you can download the installer from http://python.org as well.
While you're at it, I strongly recommend you use Python 3 (the current version is 3.6). There is no reason for a beginner to be using 2.7.
Once you have Python installed correctly, installing Pygame is as simple as:
$ pip3 install pygame
Upvotes: 1