I am getting b/m error when I try to use matplotlib . I tried many commands but could not fix the error i.e
sudo apt-get install python-matplotlib
pip install matplotlib
sudo pip3 install matplotlib
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa
Traceback (most recent call last):
File "/home/pi/Desktop/Python RL plot Nework Topology.py", line 3, in
import matplotlib.mlab as mlab
File "/usr/local/lib/python3.5/dist-packages/matplotlib/mlab.py", line 167, in from matplotlib.path import Path File "/usr/local/lib/python3.5/dist-packages/matplotlib/path.py", line 17, in
from . import _path, rcParams
ImportError: numpy.core.multiarray failed to import
and second error
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
import matplotlib Traceback (most recent call last): File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/init.py", line 16, in
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 "", line 1, in File "/usr/local/lib/python3.5/dist-packages/matplotlib/init.py", line 141, in
from . import cbook, rcsetup File "/usr/local/lib/python3.5/dist-packages/matplotlib/cbook/init.py", line 33, in
import numpy as np File "/home/pi/.local/lib/python3.5/site-packages/numpy/init.py", line 142, in
from . import add_newdocs File "/home/pi/.local/lib/python3.5/site-packages/numpy/add_newdocs.py", line 13, in
from numpy.lib import add_newdoc File "/home/pi/.local/lib/python3.5/site-packages/numpy/lib/init.py", line 8, in
from .type_check import * File "/home/pi/.local/lib/python3.5/site-packages/numpy/lib/type_check.py", line 11, in
import numpy.core.numeric as _nx File "/home/pi/.local/lib/python3.5/site-packages/numpy/core/init.py", line 26, in 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 all
files not under version control). Otherwise reinstall numpy.
Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory
Please help. how to fix this error Thank in advance