self.h5_file = h5py.File(self.io_file, mode=self.mode) AttributeError: ‘NoneType’ object has no attribute ‘File’
在使用Nuitka打包python程序后,运行exe文件时报错:

原因
在复制keras包到项目目录下时没有把h5py
也复制过去。
解决方案
把keras
,h5py
一同复制过去即可解决问题。

如果虚拟环境中没有h5py
使用pip安装
pip install h5py