Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pygame.base raises ImportError #47

Closed
illume opened this issue Aug 22, 2011 · 6 comments
Closed

pygame.base raises ImportError #47

illume opened this issue Aug 22, 2011 · 6 comments
Labels

Comments

@illume
Copy link
Member

illume commented Aug 22, 2011

Originally reported by: René Dudfield (Bitbucket: illume, GitHub: illume)


== 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.


@illume
Copy link
Member Author

illume commented Aug 23, 2011

Original comment by 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/Frameworks//SDL.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

@illume
Copy link
Member Author

illume commented Aug 23, 2011

Original comment by René Dudfield (Bitbucket: illume, GitHub: illume):


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.

@illume
Copy link
Member Author

illume commented Aug 25, 2011

Original comment by Anonymous:


Hi illime,

Thanks a lot :). The link to the pkg seems broken, though.

@illume
Copy link
Member Author

illume commented Sep 5, 2011

Original comment by René Dudfield (Bitbucket: illume, GitHub: illume):


Hello,

there are some new OSX binaries listed on the pygame.org page.
http://pygame.org/download.shtml

There are also install instructions there if you use the homebrew package manager.

It would be good to know if any of them work for you?

cheers,

@illume
Copy link
Member Author

illume commented Sep 8, 2013

Original comment by Elena Williams (Bitbucket: elequ, GitHub: elequ):


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

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!

@illume
Copy link
Member Author

illume commented Jan 23, 2014

Original comment by René Dudfield (Bitbucket: illume, GitHub: illume):


Closing this issue because it's got a bunch of unrelated errors in here.

There are other issues opened already because of the various problems listed in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant