Python 3.x 导入tensorflow时的未来警告

Python 3.x 导入tensorflow时的未来警告,python-3.x,tensorflow,Python 3.x,Tensorflow,我刚开始学习tensorflow,碰巧遇到了IPython控制台生成的未来警告 以下是代码块: import tensorflow as tf x1 = tf.constant(4) print(x1) 我以“hello.py”的名称保存了它,并在IPython控制台上逐行执行它 该命令执行成功,但最后出现警告 Python 3.6.7 |Anaconda, Inc.| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)] T

我刚开始学习tensorflow,碰巧遇到了IPython控制台生成的未来警告

以下是代码块:

import tensorflow as tf
x1 = tf.constant(4)
print(x1)
我以“hello.py”的名称保存了它,并在IPython控制台上逐行执行它

该命令执行成功,但最后出现警告

Python 3.6.7 |Anaconda, Inc.| (default, Oct 28 2018, 19:44:12) [MSC v.1915 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 7.2.0 -- An enhanced Interactive Python.

In [1]: import tensorflow as tf
C:\Users\singh\Anaconda3\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

In [2]: x1 = tf.constant(4)

In [3]: print(x1)
Tensor("Const:0", shape=(), dtype=int32)
我不明白为什么我会收到这个警告。有办法解决这个问题吗

Tensorflow版本:1.10.2
Python IDE:Spyder(蟒蛇)
操作系统:Windows 10 x64使用此命令行 pip安装h5py==2.8.0rc1
h5py软件包可能有问题,升级它可以解决您的问题

我无法找出此警告的原因-不可复制的