最近我用pygame做了一个简单的游戏,它完美无瑕。现在我想把它转换成EXE。我是用pyinstaller完成的:pyinstaller --onefile dodge1.py
但是当我运行EXE时,我得到了这个错误,我不知道该如何处理它,因为我是一个初学者,以前从未见过它:
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "dodge1.py", line 168, in <module>
File "dodge1.py", line 97, in game_intro
File "site-packages\pygame\pkgdata.py", line 50, in getResource
File "site-packages\pkg_resources\__init__.py", line 1129, in resource_exists
File "site-packages\pkg_resources\__init__.py", line 1399, in has_resource
File "site-packages\pkg_resources\__init__.py", line 1452, in _has
NotImplementedError: Can't perform this operation for unregistered loader type
[5588] Failed to execute script dodge
1个
这是第168和97行中的内容,因为这些似乎是有问题的行:
168:game_intro()
97:LargeText = pygame.font.Font('freesansbold.ttf', 70)
如果你想要完整的170行代码,请发表评论,我只是没有把这个问题写得太长。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐