Reputation: 21
I downloaded openCV from github and built it from source because I need a very specific release from openCV ie openCV2.4 . When trying to run some code written in Python, I get "No module named cv2".
I therefor tried pip install python-opencv
.
But this returns Could not find a version that satisfies the requirement opencv-python (from version: ) No match distribution for opencv-python
What can I do to solve the "No module named cv2" issue?
I also tried this straight in the command line
$python
>>>>import cv2
which returns no module named cv2 and
$python3
>>>>import cv2
which returns no module named cv2 as well.
I am however totally able to compile my C++ code. Which means the installation was somehow successful, but something fails on the Python side.
related to my issue: https://devtalk.nvidia.com/default/topic/809406/jetson-tk1-opencv-python-quot-import-cv2-quot-/?offset=4#5207884
and
EDIT:
I was suggested to run cmake with this flag set -DBUILD_opencv_python2=ON
, but this flag doesn't seem to exist because when using cmake-gui I couldn't see it anywehere and when passing it in the terminal as a paramerer I get Manually specified variables were not used by the project: BUILD_opencv_python
Upvotes: 2
Views: 717