46

I am trying to run an Arducam MT9J001 camera on a raspberry pi 3b+. I am getting the following error when I try to run the program, "ImportError: libcblas.so3: cannot open shared object file: No such file or directory." I have the computer vision software downloaded onto the raspberry pi, though it seems that it is still not working. I'm not sure what other information is viable to this project, but if there is something else I should be specifying please let me know.

8
  • 1
    Hello, you should try: sudo apt-get update and then sudo apt-get install libcblas-dev. It worked for me in the same situation.
    – thvs86
    Nov 20, 2018 at 21:57
  • I appreciate the feedback. Do I need to restart my Pi after running these installs? Unfortunately I am getting the same error even after your advised installation code. Nov 20, 2018 at 22:02
  • 1
    Is it the same error? Or are you missing a different package?
    – thvs86
    Nov 20, 2018 at 22:04
  • oh it is now "ImportError: libatlas.so.3: cannot open shared object file: No such file or directory" Nov 20, 2018 at 22:08
  • 1
    What worked for me (I was missing some dependencies): pip3 install opencv-python sudo apt-get install libatlas-base-dev sudo apt-get install libjasper-dev sudo apt-get install libqtgui4 sudo apt-get install libqt4-test
    – thvs86
    Nov 20, 2018 at 22:09

3 Answers 3

91

What worked for me (I was missing some dependencies):

pip3 install opencv-python 
sudo apt-get install libcblas-dev
sudo apt-get install libhdf5-dev
sudo apt-get install libhdf5-serial-dev
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev 
sudo apt-get install libqtgui4 
sudo apt-get install libqt4-test
4
  • 4
    In addition, I also neede to install libilmbase-dev libopenexr-dev libgstreamer1.0-dev libavcodec-dev libavformat-dev libswscale-dev and libwebp-dev
    – Nebulosar
    Oct 17, 2019 at 10:53
  • Thank you! This has been a big help Jun 18, 2020 at 0:15
  • 4
    libatlas-base-dev is now replaced by libatlas-base-dev so you might want to update the update to this: sudo apt-get install libatlas-base-dev libhdf5-dev libhdf5-serial-dev libatlas-base-dev libjasper-dev libqtgui4 libqt4-test Mar 31, 2021 at 16:12
  • @blackjack75 thanks, this definitly helped out a lot since my raspberrypi 3b couldn't find the package lbcblas-dev!
    – Ari24
    Apr 28, 2021 at 10:04
80

You need to install only one package with neccessary shared object for it to work

sudo apt-get install libatlas-base-dev
3
  • 1
    on raspberry 4 Raspbian I get ImportError: libjasper.so.1: cannot open shared object file: No such file or directory
    – hamaney
    Oct 8, 2019 at 17:58
  • 3
    @hamaney You'll need to install that library sudo apt-get install libjasper-dev
    – lucidyan
    Oct 8, 2019 at 21:20
  • awesome. worked for pi 3b+ ! (issue occured when installing pandas, no real need for libqtgui4)
    – pangyuteng
    Jan 23 at 13:52
29

Exact same solution as @thvs86 but here's a single 1 line copy-paste so you don't have to insert each command individually:

pip3 install opencv-contrib-python; sudo apt-get install -y libatlas-base-dev libhdf5-dev libhdf5-serial-dev libatlas-base-dev libjasper-dev libqtgui4 libqt4-test

1
  • all at once didn't work for me. @thvs86 one-by-one approach did work. Don't know why, but if this doesn't work, give the other solution a try!
    – Nebulosar
    Oct 17, 2019 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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