title: How to set up pygame with Eclipse?
body: <p>Edit3: Additional information: I was able to get the Eclipse/pygame combo running on Windows... just not on MacOSX.</p>
  
  <hr>
  
  <p>Edit2: Compiling from the shell also works. Just Eclipse now :)
  What I've tried in Eclipse:</p>
  
  <p>For the interpreter I use auto-config and it suggests <code>/usr/bin/python</code> as interpreter. Then for PYTHONPATH he suggests all the default stuff and I then add <code>/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages</code> in addition to the rest. I still have the unresolved package "syntax" error in the code, but when compiling the only error he complains about is that there is no appropriate 64-bit architecture.</p>
  
  <p><code>../Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)</code></p>
  
  <hr>
  
  <p>Edit: I've now managed to be able to <code>import pygame</code> within IDLE and initialise pygame. In Eclipse I added the pygame path to PYTHONPATH but Eclipse complains about the architecture.</p>
  
  <hr>
  
  <p>I want to use pygame in combination with Eclipse, Pydev and Python 2.7.</p>
  
  <p>First I downloaded Python 2.7.3 and installed it.
  To be able to work in an IDE I installed Pydev on Eclipse. That all works and I am able to work in Eclipse with Pydev and the programs I test run without problems.</p>
  
  <p>Then I went on and downloaded pygame and installed that too. (<a href="http://pygame.org/ftp/pygame-1.9.1release-python.org-32bit-py2.7-macosx10.3.dmg" rel="nofollow">pygame download</a>)</p>
  
  <p>Now when I try:</p>
  
  <pre><code>import pygame
  pygame.init()
  </code></pre>
  
  <p>Eclipse tells me: <code>unresolved import: pygame</code> and when I try to compile anyway I get following message:</p>
  
  <pre><code>Traceback (most recent call last):
  File "/Users/name/Documents/workspace/test_unit/main.py", line 6, in &lt;module&gt;
  import pygame
  ImportError: No module named pygame
  </code></pre>
  
  <p>Also when I start the IDLE app and try there to import pygame I get following error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;pyshell#1&gt;", line 1, in &lt;module&gt;
  import pygame
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-    packages/pygame/__init__.py", line 95, in &lt;module&gt;
  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
  </code></pre>
  
  <p>However if I use <code>open Module...</code> via IDLE and then open pygame the module is found.
  What am I missing?</p>