i made a py2exe executable, it's a "Programming Quiz". It is made in pygame and when I run it as an EXE, it all works until the end. I assume because the end has pygame text in it. The error is below. Here's the portion of the code that doesn't work as an exe but as a normal .py:
def endgame():
global programmer
if programmer < 0:
programmer = 0
font = pygame.font.SysFont(None, 25)
text = font.render("You are: " + str(programmer) + "% a programmer.", True, black)
gameDisplay.blit(text, (170,200))
Error:
C:\Python27\Programming Survey\dist>survey.exe
survey.exe:43: RuntimeWarning: use font: DLL load failed: The specified module c
ould not be found.
(ImportError: DLL load failed: The specified module could not be found.)
Traceback (most recent call last):
File "survey.py", line 223, in <module>
File "survey.py", line 217, in main
File "survey.py", line 43, in endgame
File "pygame\__init__.pyc", line 70, in __getattr__
NotImplementedError: font module not available
(ImportError: DLL load failed: The specified module could not be found.)