- 论坛徽章:
- 1
|
本帖最后由 micrchaoo 于 2015-12-04 00:04 编辑
下载了个:cx_Freeze-4.3.3.win32-py3.4 显示安装正确
python版本:py3.4.3
定义了个setup.py:- from cx_Freeze import setup,Executable
- executables = [Executable(script='calc_gui.pyw',base='Win32GUI',compress=True)]
- build_exe_options = {'include_files':['CXCAL2C_log.pyw','lsupdate.py']}
- setup(name='calc_gui',version='0.1',description='Sample cx_Freeze script',
- options={'build_exe':build_exe_options},executables=executables)
复制代码 构建命令:python setup.py build
生成文件夹一个:build,运行内的exe文件,出现如下错误:
cx_Freeze: Python error in main script
:\python34\lib\site-packages\cx_Freeze\initscripts\Consloe.py,line 27 in<module>
exec(code,m.__dict__)
...
AttributeError:'module' object has no attribute '_fix_up_module'
'CXCAL2C_log.pyw','lsupdate.py' 这两个是我自定义的模块,其余的均是自带模块
主模块为calc_gui.pyw,其内没有:if __name__ == '__main__':等语句 |
|