I am developing a plugin that uses tk package. When I tried to import tk I got an error: ModuleNotFoundError: No module named '_tkinter'. I tried to reinstall tk but it didn't work. I would say that when i used local python tk package works.
1 Answer
QGIS uses PyQt for ui, and it doesn't come with a preinstalled Tkinter python package.
I would recommend you either include the relevant package code with your plugin (if the license allows for that),
or use PyQt to build your interface.
I would recommend learning PyQt and using the included Qt Designer as instructed here in the pyqgis developer cookbook.