Anaconda 安装TensorFlow后在jupyter中出现No module named 'numpy.core._multiarray_umath'错误

Anaconda Prompt输入 pip install -U numpy

Anaconda 安装TensorFlow后在jupyter中出现No module named 'numpy.core._multiarray_umath'错误

升级重装后就可以了 

 

验证TensorFlow是否安装成功 输入以下代码

import tensorflow as tf
hello = tf.constant('hello')

sess = tf.Session()

print(sess.run(hello))


查看是否能够正常执行。若遇到警告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.

是因为h5py包中的函数与numpy1.14有冲突,h5py的作者将在下个版本中对这个警告进行修复,若与本人一样有强迫症。使用

pip install numpy==1.13.0
1
将最新的numpy版本进行降级则可以。若遇到另一个警告2018-03-06 08:53:44.860929: I C:\tf_jenkins\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2说明你的电脑太菜了,TensorFlow嫌弃你的CPU。贡献者原文: 


什么?你看不下去这个红色的警告,行,加两行代码让他消失吧。

import os

os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"

至此,TensorFlow安装流程结束。等哥哥赚了小钱钱,一定搞1080Ti爽一爽。努力吧。希望能够帮助和我一样热爱倒腾和初入DL的各位。若有错误望海涵指正!此篇完。
 
原文:https://blog.****.net/sinat_32404247/article/details/79453651