Search code examples
python.netpyinstallercx-freezepython.net

is cx-freeze incompatible with python for .net?


for sake of testing I am using demo from https://github.com/pythonnet/pythonnet/blob/master/demo/wordpad.py to convert it to .exe using cx_freeze==5.0.

but it shows missing clr modules (obviosly). How to work around with this?

import sys
from cx_Freeze import setup, Executable

setup(
    name = "WordPad",
    version = "3.1",
    description = "A word pad demo",
    executables = [Executable("main.pyw", base = "Win32GUI")])

Disclaimer: This is my first attempt using cx_freeze.


Solution

  • This auto-discovery of pythonnet was merged to cx_freeze:

    https://github.com/anthony-tuininga/cx_Freeze/pull/251