1. pygame
  2. pygame
  3. pygame

Issues

Issue #47 wontfix

pygame.base raises ImportError

René Dudfield
created an issue

== John, 2010-05-19 10:59:30 -0700

{{{ I'm reporting this on behalf of a friend of mine who is helping me bug test a game. He installed Python 3.1 and Pygame 1.9.1 on his Windows XP machine but any Pygame scripts will crash. He tried installing and reinstalling Pygame but to no avail.

Here's the error he gets:

File "C:\Python31\lib\site-packages\pygame__init__.py", line 95, in <module> from pygame.base import *

ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. }}}


Comments (6)

  1. Anonymous

    Hi,

    Same here!

    I am using python 2.7 (from Enthought) on mac os x 10.7. While installation I did receive some of the warnings, such as

    ld: warning: ignoring file build/temp.macosx-10.5-i386-2.7/src/mouse.o, file was built for i386 which is not the architecture being linked (x86_64) ld: warning: ignoring file /Developer/SDKs/MacOSX10.5.sdk/Library/FrameworksSDL.framework/SDL, missing required architecture x86_64 in file

    simply because I am force building it for i386 arch configuration, which doesn't exist on Lion :(.

    Any ways, after installation, importing pygame creates the following crash messages:

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $ python Enthought Python Distribution -- www.enthought.com Version: 7.1-2 (64-bit)

    Python 2.7.2 |EPD 7.1-2 (64-bit)| (default, Jul 27 2011, 14:50:45) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "packages", "demo" or "enthought" for more information.

    import pygame

    Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pygame/init.py", line 95, in <module> from pygame.base import * ImportError: dlopen(/Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pygame/base.so, 2): Symbol not found: _SDL_EnableUNICODE Referenced from: /Library/Frameworks/EPD64.framework/Versions/7.1/lib/python2.7/site-packages/pygame/base.so Expected in: dynamic lookup

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  2. René Dudfield reporter
    • changed status to open

    Hi,

    I think your error is slightly different. Your issue is likely because you are using an SDL that does not support Lion. Only the latest hg SDL supports Lion. There are some more changes due to be merged into SDL tip sometime this week or next.

    I put up a build for the apple python2.7 that comes with Lion here: http://rene.f0o.com/~rene/stuff/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip

    It probably won't help with your build of python though.

    Maybe by next week SDL will be in better shape on Lion, and they might release new binaries. If not I'll put some together with what they have.

  3. Elena Williams

    Hi there!

    I just had experienced this issue and can confirm the following behavior:

    My pip installation of pygame installation worked but didn't fully support SDL:

    Test results:
    Framework SDL found
    Framework SDL_ttf not found
    Framework SDL_image not found
    Framework SDL_mixer not found
    

    So I reinstalled SDL 1.2.15 and PyGame 1.9.1 from source, now SDL support was complete:

    Hunting dependencies...
    Framework SDL found
    Framework SDL_ttf found
    Framework SDL_image found
    Framework SDL_mixer found
    

    It was at this point I experienced the following error:

    Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
    >>> import pygame
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/Library/Python/2.7/site-packages/pygame/__init__.py", line 95, in <module>
        from pygame.base import *
    ImportError: dlopen(/Library/Python/2.7/site-packages/pygame/base.so, 2): Symbol not found: _SDL_EnableUNICODE
      Referenced from: /Library/Python/2.7/site-packages/pygame/base.so
      Expected in: flat namespace
     in /Library/Python/2.7/site-packages/pygame/base.so
    

    I came across this post and installed the OSX binary posted above: http://rene.f0o.com/~rene/stuff/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip

    It's now working correctly! Thank you!

  4. Log in to comment