_tkinter.TclError: can‘t find package tkdnd Unable to load tkdnd library.解决办法
Traceback (most recent call last):
File “tkinterdnd2\TkinterDnD.py”, line 55, in _require
_tkinter.TclError: can’t find package tkdndDuring handling of the above exception, another exception occurred:
Traceback (most recent call last): File “1.导入总表生成模板.py”, line 282,
in File “tkinterdnd2\TkinterDnD.py”, line 287, in init
File “tkinterdnd2\TkinterDnD.py”, line 57, in _require RuntimeError:
Unable to load tkdnd library.
本章教程,记录该问题的解决方法, 亲测有效。
解决办法
使用pyinstaller打包时需要 ,需要将hook-tkinterdnd2.py放到项目目录中
1、hook-tkinterdnd2.py文件
from