Ask Your Question

Revision history [back]

import cv2 error in python

I have installed opencv 3.4.0 with both python2.7 and python3.5 bindings. I am able to import and use opencv successfully in python2 but not python3. I get the following error:

ImportError: /usr/local/lib/ undefined symbol: _ZNK2cv3dnn19experimental_dnn_v33Net14getLayerShapesERKSt6vectorIiSaIiEEiRS3_IS5_SaIS5_EESA

This worked transiently until I had to upgrade CUDNN for CUDA compatibility purposes. I have cleaned, uninstalled and reinstalled opencv but this issue is not resolved.

My additional setup is as follows: Ubuntu 16.04 cuDNN 7.6.1 (I have tried with 7.6.3 as well) CUDA 10.0

I am limited to keeping the above versions because of other dependencies.

Thanks in advance.