Compile seems to not include tkdnd package needed for tkinterdnd2
See original GitHub issueNutika version:
0.7.7 Commercial: None Python: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] Flavor: Unknown Executable: C:\Users\Steven\AppData\Local\Programs\Python\Python310\python.exe OS: Windows Arch: x86_64 WindowsRelease: 10
nuitka and tkinterdnd2 were installed through pip install, on pip 22.1.
Target Test.py
:
from tkinterdnd2 import *
ws = TkinterDnD.Tk()
ws.mainloop()
Commands used:
python -m nuitka --follow-imports --standalone --enable-plugin=tk-inter Test.py
python -m nuitka --follow-imports --onefile --enable-plugin=tk-inter Test.py
Compiling seems to work fine but when the .exe is opened it produces the following error:
Traceback (most recent call last):
File "C:\Users\Steven\AppData\Local\Temp\ONEFIL~1\tkinterdnd2\TkinterDnD.py", line 53, in _require
_tkinter.TclError: can't find package tkdnd
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Steven\AppData\Local\Temp\ONEFIL~1\Test.py", line 4, in <module>
ws = TkinterDnD.Tk()
File "C:\Users\Steven\AppData\Local\Temp\ONEFIL~1\tkinterdnd2\TkinterDnD.py", line 285, in __init__
File "C:\Users\Steven\AppData\Local\Temp\ONEFIL~1\tkinterdnd2\TkinterDnD.py", line 55, in _require
RuntimeError: Unable to load tkdnd library.
This issue only happens when --standalone or --onefile is used, running a compile without them works completely fine and starts the .exe as intended.
I’m not quite sure why this error occurs, any insights on it would be welcome.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
(Pyinstaller) 'tclError: can't find package tkdnd' How can I fix ...
I have a project which uses TkinterDnD2. I build it with PyInstaller and see the same error you see (more or less). Running...
Read more >Can't Compile TKinterDND3/tkdnd library into python exe file
This means a particular module ('x' in this case) was not added to the package. I have seen this occur with packages in...
Read more >python-tkdnd - PyPI
A nice and easy-to-use wrapper around the tkdnd package. No tcl installation, no build is required, just install and use it!
Read more >Issue 40893: tkinter: integrate TkDND support - Python tracker
I have got it working but I don't really understand how the installer works and it is ... it seems pointless to package...
Read more >How to Install and Use TkDnD with Python Tkinter on OSX?
By the way, placing the TkinterDnD2 Python wrapper in /Library/Frameworks/Python.framework/Versions/.../lib/python/site-packages still works on Catalina. Just ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Check it out from here: https://nuitka.net/doc/factory.html
Part of 0.8 release that I just made.