我有这样的代码,当我用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文件有关。我使用的两种系统字体是“monospace”和“Arial”。在
有谁能详细解释一下这个问题的解决方法吗?在
我也有同样的问题,原因是py2exe重视SDL_ttf.dll文件作为系统拥有的dll,并将其从分发包中排除。 你可以在你的设置.py在
您也可以访问http://thadeusb.com/weblog/2009/4/15/pygame_font_and_py2exe获取更多信息
相关问题 更多 >
编程相关推荐