Getting the below error when I do 'import cv2':

asked 2019-02-10 09:48:45 -0500

manoj4898 gravatar image

ImportError: libopencv_ml.so.3.4: cannot open shared object file: No such file or directory

edit retag flag offensive close merge delete

Comments

please rebuild using cmake -DBUILD_SHARED_LIBS=OFF (so your cv2.so does no more depend on other opencv so's at runtime)

berak gravatar imageberak ( 2019-02-10 09:50:52 -0500 )edit

How to uninstall opencv-3.4.0 completely and install opencv-4.0.0?

manoj4898 gravatar imagemanoj4898 ( 2019-02-10 10:12:02 -0500 )edit

@manoj4898. You are running python 2 instead of python 3. Are you using raspberry pi?

supra56 gravatar imagesupra56 ( 2019-02-10 10:17:14 -0500 )edit

Not on rasberry pi... I want to know a painless way to uninstall the currently installed opencv-3.4.0....

manoj4898 gravatar imagemanoj4898 ( 2019-02-10 10:28:39 -0500 )edit

OK! HEre is good tutorial for you. uninstall

supra56 gravatar imagesupra56 ( 2019-02-10 10:34:32 -0500 )edit

That tutorial is for windows!

manoj4898 gravatar imagemanoj4898 ( 2019-02-10 10:37:55 -0500 )edit

Is there any shell command in ubuntu to uninstall opencv?

manoj4898 gravatar imagemanoj4898 ( 2019-02-10 10:38:22 -0500 )edit
1

I found this: sudo make uninstall, but I had deleted the opencv-3.4.0 directory

manoj4898 gravatar imagemanoj4898 ( 2019-02-10 10:55:31 -0500 )edit