0

I'm a newbie to cx_Freeze, so I tried to make an executable for a program (I'm trying to make a compiler) that uses a the module sys with this setup.py script:

from cx_Freeze import setup, Executable

base = None

executables = [Executable("main.py", base=base)]
options = {
    'build_exe': {

    },

}

setup(
    name = "<any name>",
    options = options,
    version = "0.1",
    description = '<any description>',
    executables = executables
)

I'm using python 3.5, and when I open the generated .exe throws me this error:

Fatal Python error: Py_Initialize: unable to load the file system codec

ImportError: No module named 'codecs'

How i can fix that error?

markwalker_
  • 12,078
  • 7
  • 62
  • 99
  • 3
    Possible duplicate of [cx\_Freeze ModuleNotFoundError: No module named 'codecs'](https://stackoverflow.com/questions/47738236/cx-freeze-modulenotfounderror-no-module-named-codecs) – Xantium Feb 03 '18 at 01:27

1 Answers1

0

You just need to update your cx_freeze version to the latest and this error will be fixed. See:

cx_Freeze: “No module named 'codecs'” Windows 10

cx_Freeze ModuleNotFoundError: No module named 'codecs'

Xantium
  • 11,201
  • 10
  • 62
  • 89