安装Tensorflow时遇到的问题

1.WARNING:The h5py issue(introduced with numpy 1.14.)

/home/user/bin/conda3/lib/python3.6/site-packages/h5py/__init__.py:34: 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

解决方案一:忽视。如有强迫症在开头写2。

import os  
os.environ["TF_CPP_MIN_LOG_LEVEL"]='1' # 默认显示等级,显示所有信息  
os.environ["TF_CPP_MIN_LOG_LEVEL"]='2' # 只显示 warning 和 Error   
os.environ["TF_CPP_MIN_LOG_LEVEL"]='3' # 只显示 Error 

解决方案二:降级numpy

pip install numpy==1.13.0

参考自:stackoverflow


2.WARNING:通过pip3 install tensorflow安装通用版本。但指令集不同,需要不同的编译。

I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA

解决方案:根据Python版本和gcc选择相应tensorflow版本。
下载自:GitHub

你可能感兴趣的:(Python,tensorflow,Python)