0

System: OSX Yosemite 10.10.5

Language: Python 2.7 (must use 2.7 for class)

IDE: LiClipse

Background: For the longest time I could NOT get pygame to work at all in python. After much research I realized that pygame for mac is 32-bit while the general python 2.7 is 64-bit. So I uninstalled the 64-bit python and reinstalled 32-bit python 2.7.

Problem now: When I enter IDLE, I am able to write

>> import pygame
>> print(pygame.ver)

and

1.9.1release

is successfully returned. No problem in IDLE

HOWEVER

When I enter LiClipse and simply run:

import pygame

The following is returned:

ImportError: No module named pygame

How is this possible if pygame can be imported in IDLE?

1 Answers1

1

Make sure your IDE is running the same python version and same PYTHONPATH environment variable (check sys.version and sys.path from both IDEs).

multivac
  • 146
  • 5
  • I went ahead and did that but now it says ImportError: /Library/Frameworks/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) – Troy Smith Sep 21 '15 at 18:14
  • Your IDE might still be using 64bit Python. See this answer to check which version they are running: http://stackoverflow.com/a/9964440/5274539 – multivac Sep 21 '15 at 19:03