之前运行一直没有出现过的问题,现在换了环境总是出现
AttributeError: module 'h5py' has no attribute 'File'
解决办法:
AttributeError: module 'h5py' has no attribute 'File'
这个问题通常是由于h5py这个库的不规范造成。
比如说,我是混着使用pip和conda,可能这就是使得出现这个问题的原因
我的解决办法是
pip uninstall h5py
conda install h5py
这个问题就解决了。
这个解决办法同样适用scipy库调用的问题。

本文详细介绍了在使用h5py和scipy库时遇到的AttributeError问题,通常由于库的不规范使用导致。文章分享了一种有效的解决办法,即通过pip和conda重新安装库来修复问题。
599





