Import SYS Import numpy # must be, otherwise there will be _ufuncs error from cx_Freeze Import Setup, Executable Base = None IF sys.platform == ' win32 ' : Base = ' Win32GUI ' Options = { ' build_exe ' : { ' Packages Standard Package ' : [ ' SciPy ' ], # important ' Includes ' : [ ' atexit', 'numpy', 'scipy','matplotlib.backends.backend_tkagg', 'tkinter.filedialog','tkinter','os','numpy.core._methods', 'numpy.lib.format',], 'excludes': ['Tkinter', 'collections.sys', 'collections._weakref'] } } setup( name="test", version="1.0", description="", options=options, executables=[Executable("E:\\code\\PRML辅助教学系统\\main.py", base=base)])
python setup.py build
cKDTree.cp35-win_amd64.pyd to ckdtree.cp35-win_amd64.pyd