3

I've finished up a pygame program that I'd like to convert to an executable so I can send it to friends and family. After doing some research it seems that all the convertible programs are outdated or don't work on Mac. Does anyone know how to convert my 3.5.0 version pygame file to executable on Mac? Anything helps, thanks!

Tanman1276
  • 119
  • 2
  • 12

1 Answers1

0

Have you tried cx_Freeze? It can freeze a python game on just about any operating system provided you freeze it on that operating system.

It works with python 2.6 and up, including python 3.x.

Here's the documentation, as well as another SO question I found helpful.

NOTE: Py2exe is for Windows. You should use py2app if you aren't going to use cx_Freeze.

imyxh
  • 164
  • 10
  • Thanks so much for the help! Have you had experience using cx_Freeze by chance? I would love a little bit of a walkthrough if possible. I'm looking at the documentation and want to make sure I'm doing it correctly – Tanman1276 Dec 13 '15 at 20:47
  • So I just installed cx_Freeze by putting in Terminal: `pip install cx_Freeze` and it installed. I made a new python 3.5 file and put in `import cx_Freeze` and it ran with an error saying that cx_Freeze didn't exist. I then tried it in Python 2.7 and it ran without error. Since my game is in Python 3.5, how do I "update" cx_Freeze to accommodate Python 3.5 files? – Tanman1276 Dec 13 '15 at 21:06
  • @Tanman1276 It is possible your default pip is set to python2. Try, in order: `pip install --upgrade pip`, `pip uninstall cx_Freeze`, `pip3 install cx_Freeze`. – imyxh Dec 14 '15 at 18:25
  • Oh, and are you using `python3.5 yourfilename.py`? If not you should try that first. – imyxh Dec 14 '15 at 18:30
  • No i'm not using the `python3.5` line. Are you saying to run that line in the Terminal FIRST and then do the updrage re-install lines? – Tanman1276 Dec 14 '15 at 19:22
  • Yeah, try `python3.5 yourfilename.py` first. If that works there's no need to do the other lines involving pip. – imyxh Dec 15 '15 at 02:02