1

i am running the python code but every time is showing

line 13,in import cv2.cv as cv2

importerror: No module named cv

how to slove this problem, i am using rPi 2 opencv-3.1.0 with python 2.7

1 Answer 1

1

If you have compiled opencv from source, link cv2.so from compiled directory to your python system directory (generally it is /usr/local/lib/python2.7/dist-packages/)

If not helpful, setup venv in your project directory and link cv2.so and cv.py from python system directory to your project directory.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.