Attempting to run IntelligentObjectAvoider, I hit a RuntimeError:
File “init.pxd”, line 998, in numpy.import_array
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa
and then I "tried to fix my own car"
Configuration:
- Raspbian For Robots (git rev-parse HEAD: 91495583be661dc7aaf83b15c200945323d24b10)
- pip freeze, pip3 freeze
- gopigo3==1.2.0 (both pip and pip3)
- DI-Sensors==1.0.0 (both pip and pip3)
- pip: numpy==1.12.1 , pip3: numpy==1.15.1 (after pip3 install numpy --update)
Details:
pi@Carl:~/Carl/Projects/IntelligentObjectAvoider $ python3 robot.py
Traceback (most recent call last):
File “init.pxd”, line 998, in numpy.import_array
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xaDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “robot.py”, line 18, in
from sklearn.cluster import KMeans
File “/usr/local/lib/python3.5/dist-packages/sklearn/init.py”, line 134, in
from .base import clone
File “/usr/local/lib/python3.5/dist-packages/sklearn/base.py”, line 13, in
from .utils.fixes import signature
File “/usr/local/lib/python3.5/dist-packages/sklearn/utils/init.py”, line 9, in
from .murmurhash import murmurhash3_32
File “sklearn/utils/murmurhash.pyx”, line 26, in init sklearn.utils.murmurhash
File “init.pxd”, line 1000, in numpy.import_array
ImportError: numpy.core.multiarray failed to import
Thinking I can do this alone, I tried upgrading numpy but now I’m even deeper in trouble:
pi@Carl : ~/Carl/Projects/IntelligentObjectAvoider $ sudo pip3 install numpy --upgrade
Collecting numpy
Downloading https://www.piwheels.org/simple/numpy/numpy-1.15.1-cp35-cp35m-linux_armv7l.whl (6.4MB)
100% |████████████████████████████████| 6.4MB 45kB/s
Installing collected packages: numpy
Found existing installation: numpy 1.12.1
Not uninstalling numpy at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed numpy-1.15.1
Attempting again resulted in a different error:
pi@Carl : ~/Carl/Projects/IntelligentObjectAvoider $ python3 robot.py
Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/numpy/core/init.py”, line 16, in <module>
from . import multiarray
ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “robot.py”, line 18, in <module>
from sklearn.cluster import KMeans
File “/usr/local/lib/python3.5/dist-packages/sklearn/init.py”, line 134, in <module>
from .base import clone
File “/usr/local/lib/python3.5/dist-packages/sklearn/base.py”, line 10, in <module>
import numpy as np
File “/usr/local/lib/python3.5/dist-packages/numpy/init.py”, line 142, in <module>
from . import add_newdocs
File “/usr/local/lib/python3.5/dist-packages/numpy/add_newdocs.py”, line 13, in <module>
from numpy.lib import add_newdoc
File “/usr/local/lib/python3.5/dist-packages/numpy/lib/init.py”, line 8, in <module>
from .type_check import *
File “/usr/local/lib/python3.5/dist-packages/numpy/lib/type_check.py”, line 11, in <module>
import numpy.core.numeric as _nx
File “/usr/local/lib/python3.5/dist-packages/numpy/core/init.py”, line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you’re working with a numpy git repo, try
git clean -xdf
(removes allfiles not under version control). Otherwise reinstall numpy.
Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory