Not compiling on ARM63 (M1 Silicone)
When I try to compile a python project that uses tkinterdnd2 I get the following message:
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/tkinterdnd2/TkinterDnD.py", line 53, in _require
TkdndVersion = tkroot.tk.call('package', 'require', 'tkdnd')
_tkinter.TclError: dlopen(/opt/homebrew/lib/python3.9/site-packages/tkinterdnd2/tkdnd/osx64/libtkdnd2.9.2.dylib, 0x0006): tried: '/opt/homebrew/lib/python3.9/site-packages/tkinterdnd2/tkdnd/osx64/libtkdnd2.9.2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Downloads/elan2maxqda-main/main.py", line 15, in <module>
root = TkinterDnD.Tk()
File "/opt/homebrew/lib/python3.9/site-packages/tkinterdnd2/TkinterDnD.py", line 285, in __init__
self.TkdndVersion = _require(self)
File "/opt/homebrew/lib/python3.9/site-packages/tkinterdnd2/TkinterDnD.py", line 55, in _require
raise RuntimeError('Unable to load tkdnd library.')
RuntimeError: Unable to load tkdnd library.
same issue, cant compile an arm64 version
One good person compiled the library. Thank him very much. https://github.com/blacklein/tkinterdnd2-osxarm64
@v0hm I have uploaded a universal version of tkinterdnd2 to pypi. To install it, I suggest using "pip install tkinterdnd2-universal". If you plan on using pyinstaller, please use the hook file provided in the repository. https://github.com/blacklein/tkinterdnd2-universal
He seems to have deleted his GitHub account but you can still get it via:
pip install tkinterdnd2-universal
Mentioning here for the citizens of the future:
the tkinterdnd2-universal repository will stop working with python 3.13; however, I've started maintaining https://github.com/Eliav2/tkinterdnd2 which is the package you download with pip install tkinterdnd2.
I am also including the ARM binaries now. If you have any problems feel free to create an issue on that package.