尝试导入pygame时出错

时间:2013-07-14 23:24:12

标签: python-2.7 import pygame

Traceback (most recent call last):
  File "Untitled.py", line 1, in <module>
    import pygame
  File "/Library/Python/2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.8-intel.egg/pygame/__init__.py", line 95, in <module>
    from pygame.base import *
ImportError: dlopen(/Library/Python/2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.8-intel.egg/pygame/base.so, 2): Symbol not found: _SDL_EnableUNICODE
  Referenced from: /Library/Python/2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.8-intel.egg/pygame/base.so
  Expected in: flat namespace
 in /Library/Python/2.7/site-packages/pygame-1.9.1release-py2.7-macosx-10.8-intel.egg/pygame/base.so

嗨,我试图用python 2.7运行pygame。我安装了所有东西,但是当我导入pygame时,我收到上面的错误消息。有谁知道如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

你试过吗?from pygame.locals import *