2011-03-10 90 views
1

這是一個初學者級別的問題。我在ubuntu上教自己pygame 10.10。我下載了幾個例子,pygame工作不正常。我 懷疑安裝問題。但我不知道如何弄清楚。如何安裝pygame字體

是否還有其他我必須安裝才能完成此項工作?

  1. 我的例子:http://cid-bb9549bdfdec74f4.skydrive.live.com/self.aspx/PyPlotter/pyplotter.py

  2. 我的錯誤:

    prompt: python pyplotter.py

    pyplotter.py:27: RuntimeWarning: use font: No module named font

    (ImportError: No module named font) font = pygame.font.SysFont("arial",12)

Traceback (most recent call last):

File "pyplotter.py", line 27, in <module>

font = pygame.font.SysFont("arial",12)

File "/usr/local/lib/python2.6/dist-packages/pygame-1.9.1release-py2.6-linux-i686.egg/pygame/__init__.py",

line 70, in getattr raise NotImplementedError(MissingPygameModule)` NotImplementedError: font module not available (ImportError: No module named font)

3.我安裝pygame的有:命令的easy_install pygame的

This says I have the latest version of pygame. So, Do i need to install 
something different for fonts? 

回答

4

不是通過easy_install進行安裝,而是安裝用於pygame的Ubuntu軟件包:python-pygame(它在Universe中)。

+0

真棒!這工作。 – codingJoe 2011-03-11 01:19:10