1

I am using Ubuntu, and whenever I try to import cv2 to python I get the following error:

ImportError: libavcodec.so.54: cannot open shared object file: No such file or directory

I looked online before posting and was unable to find a solution. I tried

sudo apt-get remove python-opencv; sudo apt-get install python-opencv

but nothing worked.

Any ideas on how to correct this?

Thank you.

dylan7
  • 231

1 Answers1

0

You need to look online and see which package holds libavcodec.so.54 and install that package. Possibly libavcodec-dev