How to import cv2 in Deepnote?

1.5k views Asked by At

I'm trying to run cv2 in Deepnote, but when I do it I get the following error:

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

I have proved the following:

!pip install ffmpeg libsm6 libxext6

!pip install libgl1-mesa-dev

But when I run it, I have this error:

Could not find a version that satisfies the requirement...

No matching distribution found for...

Does anyone know how to import cv2 in Deepnote, can you help me!

Thanks!

1

There are 1 answers

0
Bijay Regmi On BEST ANSWER

It is because ffmpeg libsm6 libxext6 libgl1-mesa-dev are linux packages and you are trying to install them as if they were python packages. You need to install them to your operating system instead of python environment.

you can install them by using !apt install ffmpeg libsm6 libxext6 libgl1-mesa-dev instead.

Here you can see an example of how to do it.