Ginfio
Ginfio

Reputation: 67

Mac cxFreeze app quits unexpectedly when trying to open

I am trying to convert a python script to a mac app so I can distribute it. I'm using cxFreeze to do this. After creating the app, I try to open it but it says the app quit unexpectedly and shows some report.

(code signature invalid (errno=1)
usr/local/lib/Python (no such file)

mac report

---

my script at.py:

import tkinter as tk
from tkinter import font
window = tk.Tk()
width=1
window.title('test')
window.geometry("425x500")

label_speed = tk.Label(
    text="Speed"
)

label_speed.grid(row=1, column=1, columnspan = 5, stick="w")
window.mainloop()

And then my setup.py

from cx_Freeze import Executable, setup

base = None
if sys.platform == "win32":
    base = "Win32GUI"

executables = [Executable("at.py", base=base)]

setup(
    name="test",
    version="0.1",
    description="just for testing",
    executables=executables,
)

I used the following commands to make the mac bundle or app.

python3 setup.py build then python3 setup.py bdist_dmg I had to use python3 instead of python because it wasn't working for me.

Thanks in advance for any tips and answers

Upvotes: 0

Views: 89

Answers (1)

VenjixFirewire
VenjixFirewire

Reputation: 26

There might be two different things going on. The first thing I know I have run into with cx_freeze is that it tried to map to where it thinks the python 2.x folder should be even if I specify to run on python 3.x. The other thing might be it was downloaded on to a different path. type $ where python to see where the file path should be. If you do $ open $FILEPATH and you see that its using python3 it might be worth reaching out to the maintainer of cx_freeze and see if they have any advice.

Upvotes: 1

Related Questions