Py2exe with Tkinter Py2exe with Tkinter tkinter tkinter

Py2exe with Tkinter


For your original problem I can't say what exactly the problem is, but usually it helps with trial-and-error to guess missing files and directories. If you know what you're missing, add them to your packages (for python modules) or data_files (for other files).

The second problem is the result of some c-modules (and python itself) being build with MS Visual Studio, thus having a dependency to the MS Visual C++ 9.0 (2008) runtime. You can solve this by either:

  • owning a copy of Visual Studio (Express Edition doesn't count), so that you are permitted to redistribute the MSVCR dependencies (under the condition that you forbid your users reengeneering etc. of the dependend parts)

  • pointing your users to the download of the MS Visual C++ 2008 Redistributable package at Microsoft.


I found a bug on the virutalenv site which suggested the followinghttps://github.com/pypa/virtualenv/issues/93

for windows in your directory "C:\Environments\VirtualEnv\Scripts\activate.bat"just add which are set to the right path to TCL and TK for your python version

set "TCL_LIBRARY=C:\Python27\tcl\tcl8.5"set "TK_LIBRARY=C:\Python27\tcl\tk8.5"

and restart your cmd or shell

It worked very well for me when I had this error.


py2exe doesn't work with modules, i've heard of one called c_freeze which apparently works with modules, try that? http://cx-freeze.sourceforge.net/