Search code examples
pythonpyqtcx-freezepyenchant

I've trying to include PyEnchant library to my exe-file using cx_Freeze (windows)


I've trying to include PyEnchant library to my exe-file. How do I do this?

I have been testing this with cx_Freeze:

"C:\Python33\python.exe" "C:\Python33\Scripts\cxfreeze" "C:\Temp\CSV Viewver\csv_viewer.py" --base-name=Win32GUI -–include-modules "pyenchant" --target-dir "C:\Temp\CSV Viewver\dist"

This does not work :/


I am using: Python 3.3 (x86) / cx_Freeze 4.3.1 (x86) / pyenchant 1.6.5 (x86)


Solution

    1. The package that you import is called enchant, not pyenchant.
    2. There isn't an include-modules option to cxfreeze - it's called packages (or modules for single file modules). [I was wrong about this] See the docs.

    So try it with the option --packages=enchant.

    But if your script imports enchant, cx_Freeze should automatically pick that up, so that you don't need to specify it.