I first tried importing OpenCV and it worked and also gave me the correct version.
Then I sourced OpenVINO environment using setupvars.sh and tried the same importing OpenCV using the following command
But I am not able to import it. It is showing me the following error:
ImportError: /opt/intel/openvino_2020.2.120/deployment_tools/inference_engine/lib/intel64/libinference_engine.so: undefined symbol: _ZN3tbb8internal13numa_topology4fillEPi
I also did ldd -r libinference_engine.so and all libs are pointing to addresses without any invalid or undefined address as shown below:
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbb56345000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbb55f54000)
libtbb.so.2 => /opt/intel/openvino_2020.2.120/deployment_tools/inference_engine/external/tbb/lib/libtbb.so.2 (0x00007fbb55cec000)
libinference_engine_transformations.so => /opt/intel/openvino_2020.2.120/deployment_tools/inference_engine/lib/intel64/libinference_engine_transformations.so (0x00007fbb55a1e000)
libinference_engine_legacy.so => /opt/intel/openvino_2020.2.120/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so (0x00007fbb555ca000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbb553ab000)
libngraph.so => /opt/intel/openvino_2020.2.120/deployment_tools/ngraph/lib/libngraph.so (0x00007fbb5497a000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbb545f1000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbb543d9000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fbb541d1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbb53e33000)
I am using Intel(R) Distribution for Python 3.7.5, OpenVINO_2020.2.120, on Ubuntu 18.04
Thanks and Please help me out with this error.
Adding on to Jaivin's reply, make sure your environment OpenCV_DIR is pointing to the OpenVINO version of OpenCV (/opt/intel/openvino_2020.2.120/opencv/cmake).
This gets exported by the setupvars script, which sets your environment variables.
If you do not setup for .bashrc script (to permanently set the environment variables), you'll have to setup every time for each terminal.
Thank you for your help. I was already having OpenCV installed in my environment and OpenVINO also has OpenCV and both were having different versions. So I guess that was the problem.
It got solved now thank you. You can close this thread.