ImportError: numpy.core.multiarray failed to import
Posted 武睿傲雪
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ImportError: numpy.core.multiarray failed to import相关的知识,希望对你有一定的参考价值。
执行FasterRCNN源代码出现“ImportError: numpy.core.multiarray failed to import”错误
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x7
Traceback (most recent call last):
File "./faster_rcnn/train_net.py", line 23, in <module>
from lib.fast_rcnn.train import get_training_roidb, train_net
File "./faster_rcnn/../lib/__init__.py", line 1, in <module>
import fast_rcnn
File "./faster_rcnn/../lib/fast_rcnn/__init__.py", line 9, in <module>
from . import train
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 11, in <module>
import tensorflow as tf
File "/usr/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/usr/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/lib/python2.7/site-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 import
解决方法:
更新numpy版本,删除老的版本
pip install -U numpy
以上是关于ImportError: numpy.core.multiarray failed to import的主要内容,如果未能解决你的问题,请参考以下文章
ImportError:无法导入名称 VarianceThreshold
橙色3:ImportError:无法导入名称'_variable'
ImportError:无法导入名称'password_reset'
ImportError:导入 dj_database_url ImportError:没有名为“dj_database_url”的模块