I created a small script to test cx_Freeze, shown below:
sqrt.py:
import math
sqrt = math.sqrt
x = float(input('Enter a number:'))
y = sqrt(x)
print(y)
input('Press ENTER to exit')
I also created a setup script:
setup.py:
from cx_Freeze import setup, Executable
setup( name = "sqrt",
version = "0.1",
description = "Testing",
# options = {"build_exe": build_exe_options},
executables = [Executable("sqrt.py")])
Next, I launch Windows cmd.exe in the folder where python.exe, sqrt.py and setup.py are located and enter:
path\python.exe setup.py build
As it should, this creates a build directory, which contains amongst others a sqrt.exe. When I attempt to execute this, it returns
"The application was unable to start correctly (0xc000007b). Click OK to close the application."
For as far as I understand the cx_Freeze documentation, this should work. Ditto for various YouTube tutorials I've watched.
I'm running Windows10 64x, Python 3.5 and cx_freeze 5.0.