Cannot import tkinter in excel

When I type python code “import tkinter as gui”, I got an error message “ImportError: cannot open shared object file: No such file or directory”

How can I setup the environment to use tkinter in excel ?


Python in Excel does not have support for graphical displays such as tkinter. It is intended to return objects which can be displayed within the Excel grid (scalar, list, DataFrame, etc).

While there is support for matplotlib images, those are returned as static images (png) rather than interacting with the window system directly.