I\'m trying to convert a basic tkinter GUI program to an .exe using py2exe. However I\'ve run into an error using the following conversion script.
# C:\\Pyth
With respect to MSVCR90.dll, see this post which packages it and maybe less preferable than having user install it separately.
Also, the specific issue in that post was mine and i still don't understand root cause. That said, a complete uninstall python and clean rebuild worked great... maybe that is your issue too. py2exe gives RuntimeError: Too early to create image
I found a bug on the virutalenv site which suggested the following https://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.
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.
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/