【发布时间】:2014-02-15 16:20:56
【问题描述】:
当我使用 py2exe 将其转换为 .exe 时,我的这段代码可以正常工作,除非它尝试在屏幕上加载文本。它出现了错误:
C:\Users\Slinky\Desktop\dist\FlappyBat.exe:120: RuntimeWarning: use font: DLL load failed: The specified module could not be found.
(ImportError: DLL load failed: The specified module could not be found.)
Traceback (most recent call last):
File "FlappyBat.py", line 176, in <module>
File "FlappyBat.py", line 120, in main
File "pygame\__init__.pyc", line 70, in __getattr__
NotImplementedError: font module not available
(ImportError: DLL load failed: The specified module could not be found.)
根据其他一些研究,我得出的结论是我的问题与一些 .dll 文件有关。我使用的两个 SysFonts 是“monospace”和“Arial”。
谁能详细解释一下这个问题的解决方法吗?
【问题讨论】:
-
我尝试过使用 .ttf 文件,但也没有用
标签: python python-2.7 pygame py2exe