1. pygame
  2. pygame
  3. pygame

Issues

Issue #86 resolved

Can't import precompiled pygame on Mac OS X 10.7 Lion

jeremywho
created an issue

I've installed the precompiled mpkg for Lion and when I try to import pygame, I get (with verbosity turned up):

{{{

!python

import pygame

trying pygame.so

trying pygamemodule.so

trying pygame.py

pygame.pyc matches pygame.py

import pygame # precompiled from pygame.pyc Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pygame.py", line 4, in <module> from pygame.locals import * ImportError: No module named locals }}}

Any ideas?

Comments (5)

  1. René Dudfield

    Hi,

    which file did you install?

    What is your python version?

    $ which python
    /usr/bin/python
    $ /usr/bin/python
    Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
    [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

    cheers,

  2. jeremywho reporter

    I installed the file linked here: http://www.pygame.org/ftp/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip

    It looks like I have the same version as you:

    Jeremys-MacBook-Pro:~ jeremy$ which python
    /usr/bin/python
    Jeremys-MacBook-Pro:~ jeremy$ /usr/bin/python
    Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
    [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    
  3. Log in to comment