Hi everyone. Hope you are all well in these unfortunate times. Hoping for some advice please with regards to using cx-freeze on a mac. I have created an arcade game (named TheJuggler.py) using python and pygame which works fine, and am now looking to create an exec file as well as an application/dmg file for distribution. I have created the following setup.py file:
import cx_Freeze executables = [cx_Freeze.Executable("TheJuggler.py")] cx_Freeze.setup( name="TheJuggler", options={"build_exe": {"packages":["pygame"]}}, executables = executables ) I use the terminal to navigate to the folder where my .py files are, and type python setup.py build This gives the following error: Traceback (most recent call last): File "setup.py", line 1, in <module> import cx_Freeze File "/Users/martingarbutt/Library/Python/2.7/lib/python/site-packages/cx_Freeze/__init__.py", line 7, in <module> from cx_Freeze.macdist import bdist_dmg, bdist_mac File "/Users/martingarbutt/Library/Python/2.7/lib/python/site-packages/cx_Freeze/macdist.py", line 1, in <module> from distutils.core import Command, DistutilsFileError ImportError: cannot import name DistutilsFileError I understand a mac has pyton 2.7 installed by default. I also have python 3.7 installed. With this in mind, I instead type: python3 setup.py build at the terminal. (Note the 3). This works fine and generates a build/exe.macosx-10.9-x86_64-3/ folder containing TheJuggler.exe. It runs OK. I now want to create a mac application proper (including a dmg) file so others can install TheJuggler on their macs. I type: python3 setup.py bdist_dmg at the terminal. In the build folder I now see a TheJuggler-0.0.0 application as well as TheJuggler-0.0.0 dmg file. However, clicking either of these brings up the following error window: *TheJuggler-0.0.0 cannot be opened because of a problem.* Check with the developer to make sure TheJuggler-0.0.0 works with this version of macOS Btw, my os is macOS High Sierra 10.13.6. I have the latest cx-freeze installed under Python/3.7/lib/python/site-packages (6.1) as well as 2.7. Gtreafe
_______________________________________________ cx-freeze-users mailing list cx-freeze-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cx-freeze-users