import sys
import numpy # 一定要有,否则会出现_ufuncs错误
from cx_Freeze import setup, Executable
base = None
if sys.platform == 'win32':
base = 'Win32GUI'
options = {
'build_exe': {
'packages': ['scipy'], # 重要
'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)])
cKDTree.cp35-win_amd64.pyd to ckdtree.cp35-win_amd64.pyd
(注:uildexe.win-amd64-3.7libscipyspatial下的cKDTree.cp35-win_amd64.pyd 改成ckdtree.cp35-win_amd64.pyd )