-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenVINO No module named 'cv2' #25
Comments
Multiple other issues address the same thing. After running
This led me to find more related issues: I added
|
I am getting the common module not found error on import cv2 when trying to run an inference with classification_sample.py Already tried moving up to latest openvino install, although I am using the apt-get method instead of the option from Intel on http://registrationcenter-download.intel.com/akdlm/irc_nas/16057/l_openvino_toolkit_p_2019.3.376.tgz I might try that next, but need to go pull out my hair first.
Close #15 Began with dreaded cv2 not found. Having earned agony earlier in this project, I knew that the problem was most likely with running setupvars and init OpenVINO env. Log in with a shell (as root, which prompted the run_root addition) and running 'source /opt/intel/openvino/bin/setupvars.sh' allowed me to then run the classification sample. Actually, I had to unearth some dependencies first, such as libsm6, libgtk... all the ones now included in the first RUN in Dockerfile. The 'source' command in bash essentially makes variables and things set when the script is executed available to later processes. Simply calling setupvars.sh didn't solve the problem because then nothing was changed when I ran inference. However, source is not included in sh, which is Docker default. Fortunately, '.' served enough of the same purpose. I opted to switch to . instead of using SHELL in the Dockerfile to switch the default. I also added a '-l' to the CMD. This is to make sure that .bashrc gets sourced when going into an interactive shell. fatal: Invalid path '/opt/intel/openvino_2019.2.242/bin/setupvars.sh allowed me to then run the classification sample. Actually, I had to unearth some dependencies first, such as libsm6, libgtk... all the ones now included in the first RUN in Dockerfile. The source command in bash essentially makes variables and things set when the script is executed available to later processes. Simply calling setupvars.sh didn't solve the problem because then nothing was changed when I ran inference. However, source is not included in sh, which is Docker default. Fortunately, . served enough of the same purpose. I opted to switch to . instead of using SHELL in the Dockerfile to switch the default. I also added a -l to the CMD. This is to make sure that .bashrc gets sourced when going into an interactive shell.
This is the dreaded import cv2 error.
I've seen it before, as have many others, but going to try and fix it permanently this time.
ab92f8d
The text was updated successfully, but these errors were encountered: