Solution for I’m not able to run a .py script with TkinterDnD2 (RuntimeError: Unable to load tkdnd library)
is Given Below:
I have created a script in Python which has a GUI and makes converts between an EML file and an HTML file. This script works perfectly on my Windows 10 computer, but now I’m trying to port it to my Mac which has macOS 11.5.1 Big Sur installed. I have installed all the packages that I need, but I’m having a problem with one specific library
When I try to run my program, I get this error:
Traceback (most recent call last): File "/Users/john/Desktop/Python/script.py", line 246, in <module> root = TkinterDnD.Tk() File "/Users/john/Desktop/Python/TkinterDnD2/TkinterDnD.py", line 271, in __init__ self.TkdndVersion = _require(self) File "/Users/john/Desktop/Python/TkinterDnD2/TkinterDnD.py", line 41, in _require raise RuntimeError('Unable to load tkdnd library.') RuntimeError: Unable to load tkdnd library.
How could I get this script working on macOS? I have already installed tkdnd2.8 in every directory that I found on the Internet, so if someone can help me, it will be awesome. Thanks!