成功解决tensorflow.keras: AttributeError: ‘str‘ object has no attribute ‘decode‘

tensorflow.keras: AttributeError: ‘str’ object has no attribute ‘decode’

出现该问题,解决分两步首先检测自身的版本是否对应,
在这里插入图片描述

然后如果版本合适

就是下面这个原因“

h5py版本太高了,降版本即可:

先卸载之前的版本
pip uninstall h5py
然后安装
pip install h5py==2.10.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

即可解决该问题!

猜你喜欢

转载自blog.csdn.net/QQ_778132974/article/details/120067587