I am distributing an app that uses the Python/C API. I have all standard python modules in python31.zip which is basically an archive of the Lib folder in the python install directory. Here is the problem – most common modules like sys and io work fine. BUT tkinter does not. I get an error “cannot find module _tkinter”. I really need tkinter in my project. I’m using Windows if that helps.
Share
I don’t the best way to bundle tkinter with your app, but I do know why you’re getting the error you are. The relevant section of the zipimport module documentation:
The module _tkinter is a c-extension / shared library. It can’t be imported from a zip file.