【问题标题】:How to install pygame font如何安装pygame字体
【发布时间】:2011-03-10 04:13:23
【问题描述】:

这是一个初级问题。我在 ubuntu 上自学 pygame 10.10。我下载了几个示例,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",

第 70 行,在 getattr raise NotImplementedError(MissingPygameModule)` NotImplementedError:字体模块不可用 (ImportError: No module named font)

3.我安装了pygame:sudo easy_install pygame

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

【问题讨论】:

    标签: python linux ubuntu pygame


    【解决方案1】:

    不要通过easy_install安装,而是安装pygame的Ubuntu软件包:python-pygame(它在宇宙中)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-21
      • 1970-01-01
      • 1970-01-01
      • 2015-05-11
      • 1970-01-01
      • 1970-01-01
      • 2013-10-21
      • 2018-06-21
      相关资源
      最近更新 更多