I am trying to compile a hello world program in Python into a stand-alone binary/package on Linux using cx_Freeze. When cx_Freeze is run, it completes without an error but when I attempt to run the generated executable, I am given the error:
ImportError: No module named __startup__
My setup.py file is:
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = [], excludes = [])
base = 'Console'
executables = [
Executable('test.py', base=base)
]
setup(name='test',
version = '1.0',
description = '',
options = dict(build_exe = buildOptions),
executables = executables)
And it is run as such:
python setup.py build
I am confused as to why this is happening. If the ImportError was for a library, I would understand - but __startup__
is unfamiliar to me.
Thanks.
I had the same problem with cx_Freeze 5.0.0. I was able to fix this after downgrading cx_freeze to 4.3.4. Other versions may also work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With