44

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.

starball
  • 20,030
  • 7
  • 43
  • 238
isaiahoptics22
  • 465
  • 1
  • 5
  • 6
  • 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 '18 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. – isaiahoptics22 Nov 20 '18 at 22:02
  • 1
    Is it the same error? Or are you missing a different package? – thvs86 Nov 20 '18 at 22:04
  • oh it is now "ImportError: libatlas.so.3: cannot open shared object file: No such file or directory" – isaiahoptics22 Nov 20 '18 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 '18 at 22:09
  • That worked great!! Thank you! I am now getting the error "ImportError: /home/pi/ArduCAM_USB_Camera_Shield/RaspberryPi/Python/Streaming_demo/ArducamSDK.so: undefined symbol: _Py_ZeroStruct" Is this now an unrelated error to this thread? – isaiahoptics22 Nov 20 '18 at 22:16
  • Yes, I think you should start a new question about this one. I'm glad it helped you at least so far. – thvs86 Nov 20 '18 at 22:20
  • I appreciate all of your help! – isaiahoptics22 Nov 20 '18 at 22:21

3 Answers3

90

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
thvs86
  • 1,458
  • 2
  • 20
  • 24
  • 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 '19 at 10:53
  • Thank you! This has been a big help – isaiahoptics22 Jun 18 '20 at 00: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 – blackjack75 Mar 31 '21 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 '21 at 10:04
78

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

sudo apt-get install libatlas-base-dev
Community
  • 1
  • 1
lucidyan
  • 3,575
  • 2
  • 22
  • 24
28

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

某Leo
  • 3
  • 3
Human
  • 442
  • 1
  • 6
  • 15
  • 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 '19 at 10:38