I ran brew install pygame
, it installed it together with all the dependencies. Python v2.7.10 / OS X version 10.11.2
Whenever I import pygame
in a script it says this
Traceback (most recent call last):
File "~/Documents/test.py", line 1, in <module>
import pygame, random, sys
ImportError: No module named pygame
How do I fix this?
Best Answer
Have you checked which python are you running - the system python or the one you installed via homebrew? I suspect the first.
As a test, try running
and typing
If this works, you can make the brew version the default by using: