pmgagne / tkinterdnd2

Tkinter native drag and drop support for windows, unix and Mac OSX.
MIT License
55 stars 20 forks source link

Not compiling on ARM63 (M1 Silicone) #7

Open lterfloth opened 2 years ago

lterfloth commented 2 years ago

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.
ghost commented 2 years ago

same issue, cant compile an arm64 version

v0hmly commented 1 year ago

One good person compiled the library. Thank him very much. https://github.com/blacklein/tkinterdnd2-osxarm64

ghost commented 1 year ago

@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

DalbyTech commented 1 year ago

He seems to have deleted his GitHub account but you can still get it via: pip install tkinterdnd2-universal

Squiblydoo commented 2 months ago

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.