GithubHelp home page GithubHelp logo

pygame.base raises ImportError about pygame HOT 6 CLOSED

pygame avatar pygame commented on May 13, 2024
pygame.base raises ImportError

from pygame.

Comments (6)

illume avatar illume commented on May 13, 2024

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.

from pygame.

illume avatar illume commented on May 13, 2024

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!

from pygame.

illume avatar illume commented on May 13, 2024

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,

from pygame.

illume avatar illume commented on May 13, 2024

Original comment by Anonymous:


Hi illime,

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

from pygame.

illume avatar illume commented on May 13, 2024

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.

from pygame.

illume avatar illume commented on May 13, 2024

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

from pygame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.