Skip to main content
GameDev.net gamedev.net
🔒 Locked

making a pygame exe with py2exe?

Started by tmonell Jan 31, 2010 at 9:21 PM 4 replies 7.4k views
Original Post
tmonell
tmonell
Hi. I'm pretty new to python so I'm just practicing some things with pygame. I wanted to convert a script to exe but I can't get it to work. From my searching it seems others are having success doing this so I assume I'm doing something wrong. All I can gather is it's a font problem. I've tried whatever 'solutions' turn up on Google and elsewhere. My script is very basic - just drawing some text to a rect. Can anyone assist? Thanks
frr171
frr171
Have you tried this script:
http://www.pygame.org/wiki/Pygame2exe
it includes the default pygame font
tmonell
tmonell
Quote:
Original post by frr171
Have you tried this script:
http://www.pygame.org/wiki/Pygame2exe
it includes the default pygame font


yes I tried this. It creates the exe. When I run that I get a popup with "errors occured check log file" type message. Inside the log file is this:

test2:33: RuntimeWarning: use font: MemoryLoadLibrary failed loading pygame\font.pyd
(ImportError: MemoryLoadLibrary failed loading pygame\font.pyd)
Traceback (most recent call last):
File "test2.py", line 33, in
File "pygame\__init__.pyo", line 70, in __getattr__
NotImplementedError: font module not available
(ImportError: MemoryLoadLibrary failed loading pygame\font.pyd)
daviangel
daviangel
Try following this guide:
Distributing modules and programs
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
tmonell
tmonell
I followed that guide but kept getting dll errors. I just decided to copy every dll from the pygame directory into my dist folder and it finally worked. So one or more of them are the culprit. They are small enough that I won't worry about tracking down which one right now. ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.