from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"excludes": ["tkinter","cvxopt","PySide","matplotlib"],
"packages":["PyQt4.QtGui","PyQt4.QtCore","atexit",'pyqtgraph'],"include_msvcr":True,
'compressed':True,'copy_dependent_files':True,'create_shared_zip':True,
'include_in_shared_zip':True,'optimize':2}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
I included the error in the attachment.
Thank you very much for your help.
Hi all,I'm having difficulty now trying to bundle my application with cx_freeze.
Hi Luke,
It's now working, so I can bundle pyqtgraph using cx_freeze.
Hi Luke,
includes = ['PyQt4.QtCore', 'PyQt4.QtGui', 'sip', 'pyqtgraph.graphicsItems','numpy',"atexit"]
excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',"cvxopt",
'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl','tables',
'Tkconstants', 'Tkinter', 'zmq','PySide','pysideuic','scipy','matplotlib']
if sys.version[0] == '2':
# causes syntax error on py2
excludes.append('PyQt4.uic.port_v3')
base = None
if sys.platform == "win32":
base = "Win32GUI"
build_exe_options = {"excludes": excludes,
"includes":includes,"include_msvcr":True,
'compressed':True,'copy_dependent_files':True,'create_shared_zip':True,
'include_in_shared_zip':True,'optimize':2}
setup( name = "Test Software",
version = "0.1",
description = "uITLA test software",
options = {"build_exe": build_exe_options},
executables = [Executable("uITLATCscanQ.py", base=base)])
Hi Luke,I used the github's development version, and here is my cx_freeze script:I basically get the py2exe script example from GitHub folder, and modified it for cx_freeze