Python/TensorFlow

eclipse+tensorflow 실행중 오류

나쁜천사1004 2019. 3. 6. 11:05

아래 소스 실행중 오류가 발생 하였다.


#소스 실행


import tensorflow as tf


hello = tf.constant("Hello,TensorFlow!")

sess = tf.Session()


print(sess.run(hello))


a = tf.constant(10)

b = tf.constant(32)


print(sess.run(a+b))   



#오류


ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

ImportError: numpy.core.multiarray failed to import


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "<frozen importlib._bootstrap>", line 980, in _find_and_load

SystemError: <class '_frozen_importlib._ModuleLockManager'> returned a result with an error set

ImportError: numpy.core._multiarray_umath failed to import

ImportError: numpy.core.umath failed to import

2019-03-06 10:58:52.953023: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr 



#해결 방한


cmd 창에서 pip install --upgrade numpy


결과

b'Hello,TensorFlow!' 42



성공!!


반응형