0

Rasp 3 B+, Raspbian

I installed OpenCV using pip3 install opencv-python

Then tried to import cv2 which threw the error..

ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

After much searching I found this blog post about missing dependencies & found that the following dependencies are missing,

libcblas.so.3
libatlas.so.3
libjasper.so.3

At this stage in the blog post it suggests using apt-file to find which packages need installing to get the missing so's but when I try to install apt-file via sudo apt install apt-file I get the following error...

E: Unable to locate package apt-file

I get the same error if I try to install libcblas-base or libjasper which contain the missing so's

(side note: I am assuming libcblas is an implimentation of the Basic Linear Algebra Subprograms library?)

So how do I get access to these missing packages & libraries? This is my first exposure to the world of Linux repositories by the way.

  • Did you try sudo apt update? – jake Jan 25 at 15:14
1

You probably just need to run

sudo apt update

That needs to be done to find new versions. After that you can use apt to install the packages you need to get those libraries. For example libcblas.so.3 can be installed with

sudo apt install libcblas3

For reference rather than apt-file I just use things like

apt search libcblas

When I want something like libcblas.so.3 Then I pick the one that looks appropriate. Nothing wrong with apt-file it's just something else to install.

You also want to periodically run

sudo apt upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.