当我在 Python 中导入
tensorflow
时,出现此错误:
C:\Users\Sathsara\Anaconda3\envs\tensorflow\Lib\site-packages\h5py\__init__.py:36:
FutureWarning: Conversion of the second argument of issubdtype from
float to np.floating is deprecated. In future, it will be treated
as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
这不是一个错误,它只是通知您在未来的版本中此功能或行为将发生变化或不再可用。
如果您打算在不同版本的 python 和tensorflow 中重用此代码,这一点很重要。
您可以将 h5py 升级到更新版本。这对我有用。
sudo pip3 install h5py==2.8.0rc1