• Register
0 votes
898 views

Problem :

While trying to import the OpenCV, using import cv2 I facing the below error:

/usr/local/lib/python2.7/dist-packages/cv2/__init__.py in <module>()
12 
13 # make IDE's (PyCharm) autocompletion happy
----> 14 from .cv2 import *
15 
16 # wildcard import above does not import "private" variables like __version__
ImportError: libSM.so.11: cannot open shared object file: No such file or directory

I am not sure how to fix this issue – I am trying to play around with the Google's new Colaboratory tool.

Please let me know if someone have solution for the above issue.

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I was also not able to install the cv2 on Anaconda-Jupyter notebook which was running on Ubuntu on Google Cloud Platform. But I found the way to do it as below :

Please run the below command from your ssh terminal and follow the instructions:

 sudo apt-get install libsm6 libxrender1 libfontconfig1

Once its installed please Open the Jupyter notebook and try to run the below command:

!pip install opencv-contrib-python

Please Note: I had tried to run below command:

"sudo python3 -m pip install opencv-contrib-python"

But it was showing me an error. But above command really worked for me.

Now just refresh your notebook page and check whether it is installed or not by running the import cv2 in your notebook.

9 7 4
38,600 points

Related questions

0 votes
1 answer 5 views
5 views
Problem: When trying to import OpenCV, using import cv2 I get the following error: /usr/local/lib/python2.7/dist-packages/cv2/__init__.py in <module>() 7 8 # make IDE's (PyCharm) autocompletion happy ----> 9 from .cv2 import * 10 11 # ... trying to play around with Google's new Colaboratory tool. Notebook is here: https://drive.google.com/file/d/0B7-sJqBiyjCcRmFkMzl6cy1iN0k/view?usp=sharing
asked Apr 26 Yeamin 21.4k points
0 votes
1 answer 174 views
174 views
Problem : I am facing following error while importing the Tensorflow. >>> import tensorflow Traceback (most recent call last): File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module> from tensorflow.python. ... soon as I open the terminal windows, and type nvcc -V in the new terminal window it again shows that not installed
asked Dec 7, 2019 alecxe 7.5k points
0 votes
1 answer 4 views
4 views
Problem: I am currently trying to run a project from GitHub: github.com/nilboy/pixel-recursive-super-resolution After installing ubuntu on VM, I installed python with tensorflow 2.7 using the pip command. When I try to run the training session with python I get this error: ... I don't have an NVIDIA GPU and I am trying to run this project on the CPU. Can you help identify the tensorflow problem?
asked Apr 25 sumaiya simi 43.9k points
0 votes
1 answer 34 views
34 views
Problem : I am facing following error : Importerror: libcuda.so.1: cannot open shared object file: no such file or directory .
asked Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 2.2K views
2.2K views
Problem : The import matplotlib.pyplot as plt is is giving me the error with python2.7, anaconda3. The error shown is as below: ImportError: libGL.so.1: cannot open shared object file: No such file or directory The Detailed Error report is as below : Traceback ... <module> from PyQt5 import QtCore, QtGui, QtWidgets ImportError: libGL.so.1: cannot open shared object file: No such file or directory
asked Dec 18, 2019 alecxe 7.5k points
0 votes
1 answer 1.9K views
1.9K views
Problem : I am facing following error : ImportError: libcuda.so.1: cannot open shared object file: No such file or directory Failed to load the native TensorFlow runtime. Above error comes up when I tried to import the tensorflow. Is there anybody who has faced this error before and know the solution on it?
asked Dec 10, 2019 alecxe 7.5k points
0 votes
1 answer 153 views
153 views
Problem : I am very new to tensorflow-gpu, I want to use the tensorflow-gpu on my system. I have already tried to reinstall tensorflow-gpu many times but still it shows me the following error.If I use the tensorflow-cpu then it works correctly. Please Note: I ... ) ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory Can somebody help me in fixing above error ?
asked Feb 19, 2020 mphil 2.3k points
0 votes
2 answers 141 views
141 views
Problem : I have recently installed the cuda 8.0 and cuda 9.0 in the Gpu support system. I encountered the below error while importing from the keras module. It says it is unable to load the native tensorflow runtime. I have received the error log as below: Traceback ... is, Cuda compilation tools, release 8.0, V8.0.61 Is it the clash between two cuda versions? Have anyone solved this before?
asked Feb 18, 2020 mphil 2.3k points
0 votes
1 answer 322 views
322 views
Problem : I am building the TensorFlow from the source code. The build appears to succeed; but, when my TensorFlow program invokes the import tensorflow, one or both of the following errors starts appearing: · ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory · ImportError: libcudnn.5: cannot open shared object file: No such file or directory
asked Dec 9, 2019 alecxe 7.5k points
0 votes
1 answer 286 views
286 views
Problem : I have installed Cuda 10.1 and cudnn on Ubuntu 18.04 for the first time and it seems to be installed properly as when I type nvcc and nvidia-smi I am getting proper response. I have also installed tensorflow using following command: user:~$ sudo ... solutions. Include the entire stack trace above this error message when asking for help. Am I missing something? How to resolve this issue?
asked Nov 27, 2019 AbhijitJ 38.6k points