3
\$\begingroup\$

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?

\$\endgroup\$
2
  • \$\begingroup\$ Also is 4 years old @Philipp \$\endgroup\$
    – Tom Prats
    Commented Sep 13, 2016 at 15:42
  • \$\begingroup\$ it got mentioned as a duplicate from another question, so I want to redirect them all to one question. \$\endgroup\$
    – Philipp
    Commented Sep 13, 2016 at 15:48

3 Answers 3

1
\$\begingroup\$

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.

\$\endgroup\$
4
\$\begingroup\$

Well, I'm really new in Python's World. But maybe py2exe can help you.

\$\endgroup\$
1
  • \$\begingroup\$ when I was googling this I heard about some problems that I really didn't understand enough to re-explain them, but if there's another option I would prefer it! Thanks though, I'll select your answer if no other choices come out \$\endgroup\$
    – Tom Prats
    Commented Jul 27, 2012 at 17:25
0
\$\begingroup\$

The technical part of publishing is described correctly in Luiz's answer, but publishing also involves licensing your game, usually. For that, I suggest you use the Mit license, if you plan to make it unprofitable and aopen-source.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ i should have specified, i plan to just distribute it to friends and don't mind if code is taken from it without acknowledgement \$\endgroup\$
    – Tom Prats
    Commented Jul 27, 2012 at 18:19

Not the answer you're looking for? Browse other questions tagged .