RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

网友投稿 1780 2022-08-22

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa

我在运行tensorflow object detection API的demo的时候,出现了下面的错误:

whsyxt@whsyxt:~/Downloads/gaoshengwu/models/research/object_detection$ python object_detection_tutorial.py RuntimeError: module compiled against API version 0xb but this version of numpy is 0xaRuntimeError: module compiled against API version 0xb but this version of numpy is 0xaTraceback (most recent call last): File "object_detection_tutorial.py", line 17, in import tensorflow as tf File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 24, in from tensorflow.python import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in raise ImportError(msg)ImportError: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in from tensorflow.python.pywrap_tensorflow_internal import * File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)ImportError: numpy.core.multiarray failed to importFailed to load the native TensorFlow runtime.See some common reasons and solutions. Include the entire stack traceabove this error message when asking for help.

然后我的解决办法是:

sudo pip install numpy --upgrade

然后就可以完美运行啦。

参考文献

[1].How can I upgrade numpy?.module compiled against API version a but this version of numpy is 9.https://github.com/Theano/Theano/issues/3623

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Jetson-TX2安装tensorflow教程
下一篇:TensorFlow Models:ImportError: No module named 'deployment'
相关文章

 发表评论

暂时没有评论,来抢沙发吧~