I am trying to install OpenCV in google colab notebook. The official documentation says to do:
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
The first statement works fine and installs everything. But on importing cv2 I am getting an error saying:
ImportError: libSM.so.6: cannot open shared object file: No such file or directory
Any fix for this issue? Thanks for help!
OpenCV comes preinstalled on Google colab.
Simply import cv2 and use it.
I can't reproduce this issue. The snippet above seems to work fine. https://colab.research.google.com/notebook#fileId=1OnUy6eFE7XhdfGfAHDCqQxpwueTOj_NO
Perhaps try restarting your backend via the Runtime -> Restart runtime menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With