导入tensorflow ,提示警告信息的解决办法

当在程序中导入tensorflow出现下面错误

 

E:\Anaconda\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

解决办法

1. 提高 h5py版本

pip install h5py

2.降低nupy版本

pip install numpy==1.13.3

3.在程序开头添加

import os

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

你可能感兴趣的:(Python)