2016-11-07 106 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