RuntimeError: module compiled against API version 9 but this version of numpy is 6
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: numpy.core.multiarray failed to import
pip show numpy
output shown below
---
Name: numpy
Version: 1.8.2
Location: /usr/lib/python2.7/dist-packages
Requires:
我用了 pip install numpy --upgrade
but numpy still shows to be 1.8.2 and error continues to exist when running matplotlib.
Solution:
Check the path
import numpy
print numpy.__path__
于是我删除了 /usr/lib/python2.7/dist-packages/numpy文件夹 ,就好了