我的操作系统是 OSX 10.8(山狮),我使用的是 python 2.7.3。我以为我已经成功安装了pygame。不幸的是,我错了。我可以导入 pygame,但是导入 pygame.font 时出现问题
>>> import pygame
>>> import pygame.font
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/pygame/font.so, 2): Symbol not found: _TTF_CloseFont
Referenced from: /usr/local/lib/python2.7/site-packages/pygame/font.so
Expected in: flat namespace
in /usr/local/lib/python2.7/site-packages/pygame/font.so
我猜这是框架 SDL_ttf 的问题,但我相信我已经成功安装了这个框架。我按照这个说明安装了pygame,这是运行的结果sudo python config.py
Hunting dependencies...
Framework SDL found
Framework SDL_ttf found
Framework SDL_image found
Framework SDL_mixer found
Framework smpeg not found
PNG : found
JPEG : found
SCRAP : not found
PORTMIDI: not found
Framework CoreMidi found
我应该怎么做才能导入 pygame.font?