Tensorflow学习~cmd中运行import tensorflow as tf出现FutureWarning解决办法

解决cmd中import tensorflow as tf运行时出现的问题:

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。

本人使用anaconda安装的tensorflow,首先打开开始菜单中的Annconda Prompt:

Tensorflow学习~cmd中运行import tensorflow as tf出现FutureWarning解决办法_第1张图片

接着执行语句:pip install h5py==2.8.0rc1,等待安装完毕:

Tensorflow学习~cmd中运行import tensorflow as tf出现FutureWarning解决办法_第2张图片

再次启动cmd,进入python环境,执行 import tensorflow as tf,不再出现警告。

Tensorflow学习~cmd中运行import tensorflow as tf出现FutureWarning解决办法_第3张图片

你可能感兴趣的:(Tensorflow学习)