OpenCV Python No module named 'cv2'
I've got installed and running OpenCV with C++. Tried to test it with Python3, but
workon dl4cv
python3
import cv2
returns
ModuleNotFoundError: No module named 'cv2'
My environment is Ubuntu 18.4, OpenCV 3.4.10 , Python 3.6.9
People on stackexchange suggest various manipulation with .profile and pathes without explaining why, but without understanding I feel uncomfortable performing such shaman tambourine dances over system parameters.
Could some oneexplain or give links to the resources, explaining how this is working and how to fix it if is does not work?
Did you install python-opencv? Just OpenCV is not enough.
https://docs.opencv.org/3.4/d2/de6/tu...
I installed OpenCV using https://www.learnopencv.com/install-o.... Install OpenCV 4 on Ubuntu 18.04 (C++ and Python) .
It does not have an explicit line install python-opencv, yet it has Python-related sections Step 3: Install Python Libraries:
now install python libraries with
pip install wheel
numpy
scipy
matplotlib
scikit-image
scikit-image
scikit-learn ipython dli
Sorry, every time I struggle formatting my comments and still it looks like mess. It ignores line breaks, preformatted text for code has its own agenda and now one line for some reason is shown in large letters
need to add that in /home/a/.virtualenvs/dl4cv/lib/python3.6/site-packages/ i have cv2.so The link you provided https://docs.opencv.org/3.4/d2/de6/tu... reads that python-opencv is just one way to install OpenCV using from Pre-built Binaries . Another one is Building OpenCV from source. This is how I did.
Do I still need to install python-opencv or perhaps I need just to help it to locate cv2.so ?