# -*- mode: python ; coding: utf-8 -*- import sys from PyInstaller.utils.hooks import collect_data_files import numpy block_cipher = None # 收集相关文件 numpy_data = collect_data_files('numpy') sklearn_data = collect_data_files('sklearn') a = Analysis( ['main.py'], pathex=[], binaries=[], datas=[ (numpy.__path__[0], 'numpy'), *numpy_data, *sklearn_data ], hiddenimports=[ 'numpy', 'numpy.core._methods', 'numpy.lib.format', 'numpy.core._multiarray_umath', 'sklearn', 'sklearn.neighbors._partition_nodes', 'sklearn.neighbors._quad_tree', 'sklearn.utils._cython_blas', 'sklearn.utils._typedefs', 'sklearn.utils._heap', 'sklearn.utils._sorting', 'sklearn.utils._vector_sentinel', 'setuptools', 'setuptools.distutils', 'setuptools.distutils.version', 'distutils', 'distutils.version' ], hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, noarchive=False, ) pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE( pyz, a.scripts, a.binaries, a.zipfiles, a.datas, [], name='odm_preprocess', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir=None, console=True, disable_windowed_traceback=False, target_arch=None, codesign_identity=None, entitlements_file=None, )