2016-11-07 105 views
0

我有ubuntu 14.04;在ubuntu中導入tensorflow時出錯

如果我'導入tensorflow

>>> import tensorflow 

:但是當我運行導入tensorflow一個得到這個錯誤。

RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 23, in <module> 
    from tensorflow.python import * 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module> 
    _pywrap_tensorflow = swig_import_helper() 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper 
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description) 
ImportError: numpy.core.multiarray failed to import 

這是什麼問題,以及如何解決這個問題?

回答

1

您需要將您的numpy版本更新爲10(您的當前版本爲9)。

+0

請給我一個指令 – MohaMed