C:\....\Anaconda3\envs\py35\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
使用Anaconda安裝的Python3.5環境,導入TensorFlow時出現如下錯誤:
<<<import tensorflow as tf C:\。..\Anaconda3\envs\py35\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
解決辦法:安裝Microsoft Visual C++ 2015 Redistributable Update 3 。不再報錯。
--------------------------------------------分--------------------------------------------割--------------------------------------------線--------------------------------------
啊這個不是導入失敗,應該是字符格式。輸出字符的時候,會在行前有一個b,比如b'Hello TensorFlow!'
在打印行加上.decode()就可以解決了,如下:
print(sess.run(hello).decode())
Hello TensorFlow!