Error: No module named cv2
NB : This answer is a short compilation of comments above. For more details, please refer to the comments below question.
Background : OP is using SPE Stani's python editor
. OP has installed OpenCV /opt/ros/hydro/lib/python2.7/dist-packages
which is not detected by the above mentioned editor. Adding this path to PYTHONPATH doesn't solve the issue.
Solution (any one of the below):
- Add this path to
sys.path
and put it in every file.
import sys
sys.path.append('/opt/ros/hydro/lib/python2.7/dist-packages')
- Copy
cv2.so
file to any directory in thesys.path
.