ronaldoussoren / py2app

py2app is a Python setuptools command which will allow you to make standalone Mac OS X application bundles and plugins from Python scripts.
Other
340 stars 36 forks source link

Tkinter linked against X11, not Cocoa #400

Open cyugao opened 2 years ago

cyugao commented 2 years ago

Hi, when I try to package a Tkinter app like this

from tkinter import Tk

root = Tk()
root.title("Feet to Meters")

root.mainloop()

The bundled app will use an X11-based Tkinter but not the Cocoa Tk. The libffi.8.dylib is also missing so I have to manually copy it to the Frameworks folder to make it work.

I am using Python 3.9.10 and tk 8.6.11.

ronaldoussoren commented 2 years ago

How did you install python? I cannot reproduce this using the python.org installer.

Does running this script using the python you're using use X11 as well?

cyugao commented 2 years ago

Hi. I was using the conda environment. I tried downloading the official Python and creating a virtualenv, but somehow the program just hung when entering the "choosing file" window. Maybe there's a bug in Tkinter.