Minimal set of files required to distribute an embed-Cython-compiled code and make it work on any machine

After further research (I tried in an empty Win 7 x64 bit VM, without any VCredist previously installed), it seems that these files are enough: the program itself, test.exe (produced by cython –embed and compilation with cl.exe) python37.dll python37.zip coming from packages named “Windows x86-64 embeddable zip file” in https://www.python.org/downloads/windows/ vcruntime140.dll, as mentioned in Can … Read more

How can I bundle other files when using cx_freeze?

Figured it out. from cx_Freeze import setup,Executable includefiles = [‘README.txt’, ‘CHANGELOG.txt’, ‘helpers\uncompress\unRAR.exe’, , ‘helpers\uncompress\unzip.exe’] includes = [] excludes = [‘Tkinter’] packages = [‘do’,’khh’] setup( name=”myapp”, version = ‘0.1’, description = ‘A general enhancement utility’, author=”lenin”, author_email=”le…@null.com”, options = {‘build_exe’: {‘includes’:includes,’excludes’:excludes,’packages’:packages,’include_files’:includefiles}}, executables = [Executable(‘janitor.py’)] ) Note: include_files must contain “only” relative paths to the setup.py script … Read more

KeyError: ‘TCL_Library’ when I use cx_Freeze

You can work around this error by setting the environment variables manually: set TCL_LIBRARY=C:\Program Files\Python35-32\tcl\tcl8.6 set TK_LIBRARY=C:\Program Files\Python35-32\tcl\tk8.6 You can also do that in the setup.py script: os.environ[‘TCL_LIBRARY’] = r’C:\Program Files\Python35-32\tcl\tcl8.6′ os.environ[‘TK_LIBRARY’] = r’C:\Program Files\Python35-32\tcl\tk8.6′ setup([..]) But I found that actually running the program doesn’t work. On the cx_freeze mailinglist it was mentioned: I have … Read more