Saturday, November 24, 2018

publishing - Publish Python Game



I wrote a Python game in for a group project using Pygame. Now we wanted to package it into an executable but I can't seem to do it. When I was working with C# through Microsoft Visual Studio it had a really simple publish feature. Is there an editor that can do that for Python with external libraries?




Answer



I've had luck compiling to executable using PyInstaller. Another possibility, as Luiz mentions, is py2exe.


Both of these tools have options to bundle all of the python libraries into the executable if you want, making it easy to distribute. Either of these might have issues with whatever libraries you might be using, so it might be easiest to check the forum of the libraries you're using to see if they have a recommendation.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...