开发环境:
-
Python 3.6
-
tensorflow 2.1
-
Filedtrip 2020 直接下载,但是需要加入spm12的Content.txt文件
-
spm 12
- 下载spm standalone ,点击运行,会解压出一个文件夹在目录spm12_r7771\spm12\spm12_mcr\spm12中找到Contents.txt 复制到Filedtrip的目录 fieldtrip-master\external\spm12中去,在打包成standalone软件的时候需要。
-
pyinstaller 打包 pyinstaller MedicalProjMain.spec
-
protobuf 3.8
MedicalProjMain.spec 中的
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['MedicalProjMain.py'],
pathex=['D:\\pycharmWorkProject\\MedicalAI'],
binaries=[],
datas=[],
hiddenimports=['pkg_resources.py2_warn','scipy.special','scipy.special.cython_special','pkg_resources.py2_warn','tensorflow','tensorflow_core.python','tensorflow_core.python.platform',
'tensorflow_core.python.platform.tf_logging','tensorflow_core.python.platform.self_check',
'tensorflow_core.python.platform.build_info','tensorflow_core.python.pywrap_tensorflow',
'tensorflow_core.python.pywrap_tensorflow_internal','tensorflow_core.python.util','tensorflow_core.python.util.deprecation',
'tensorflow_core.python.util.tf_export','tensorflow_core.python.util.tf_decorator','tensorflow_core.python.util.tf_stack',
'tensorflow_core.python.util.tf_inspect','tensorflow_core.python.util.*','tensorflow_core.python.util.decorator_utils',
'tensorflow_core.python.util.ANY.*','tensorflow_core.python.util.is_in_graph_mode','tensorflow_core.python.util.tf_contextlib',
'tensorflow_core.core','tensorflow_core.core.framework','tensorflow_core.core.framework.graph_pb2','tensorflow_core.core.framework.node_def_pb2',
'tensorflow_core.core.framework.attr_value_pb2','tensorflow_core.core.framework.tensor_pb2'],
hookspath=['.'],
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,
[],
exclude_binaries=True,
name='MedicalProjMain',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='MedicalProjMain')
安装环境:
- Windows 10
- matlab runtime