question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: libImath-2_2.so.12: cannot open shared object file: No such file or directory

See original GitHub issue

Heya I’m trying to run the command "python3 Object_detection_picamera.py " and I keep getting the this stack being returned:

Traceback (most recent call last):
  File "Object_detection_picamera.py", line 23, in <module>
    import cv2
  File "/home/pi/.local/lib/python3.5/site-packages/cv2/__init__.py", line 3, in <module>
    from .cv2 import *
ImportError: libImath-2_2.so.12: cannot open shared object file: No such file or directory

I have followed all the instructions and just wondering what is the problem - have I missed something or is there something else that I need to install?

Thank you

Osian

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

85reactions
rribanicommented, Oct 29, 2018

Install the following packages with apt-get:

libilmbase-dev libopenexr-dev libgstreamer1.0-dev

Worked for me!

17reactions
justinmiller24commented, Jan 2, 2020

Hello, I encountered the same error. Install was on a brand new Raspberry Pi 4b with the Raspbian Lite OS.

ImportError: libImath-2_2.so.12: cannot open shared object file: No such file or directory.

I traced the dependencies and found that “libImath” is part of the libilmbase23 package, so this fixed the problem:

sudo apt install libilmbase23

However, that led to a second problem:

ImportError: libIlmImf-2_2.so.22: cannot open shared object file: No such file or directory

Again, tracing the dependencies led to “libIlmImf” being part of the libopenexr package. This was only available in a dev package, so the fixed the second problem:

sudo apt install libopenexr-dev

And boom! We are up and running. Hope this helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: libmpi.so.12: cannot open shared object file: No ...
My code raises ImportError: libmpi.so.12: cannot open shared object file: No such file or directory . Traceback error: > ------ ...
Read more >
Python :ImportError:libGL.so.1: cannot open shared object file
Python : ImportError :libGL. so.1: cannot open shared object file : No such file or directory (5solution). Watch later. Share. Copy link.
Read more >
libGL.so.1: cannot open shared object file: No such ... - YouTube
PYTHON : ImportError : libGL. so.1: cannot open shared object file : No such file or directory [ Gift : Animated Search Engine ......
Read more >
ImportError: libImath-2_2.so.12: cannot open ... - CSDN博客
ImportError : libImath-2_2.so.12: cannot open shared object file: No such file or directory. qq_43650421 于 2021-03-14 10:26:44 发布 449 收藏.
Read more >
HyperLPR on Raspberry Pi - MINIRPLUS
解决:ImportError: libImath-2_2.so.23: cannot open shared object file: No such file or directory. 1. apt install libilmbase23 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found