title: How to run python from openCV (built from source) on the NVIDIA Jetson TX2?
body: <p>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".</p>
  
  <p>I therefor tried <code>pip install python-opencv</code>.
  But this returns <code>Could not find a version that satisfies the requirement opencv-python (from version: ) No match distribution for opencv-python</code></p>
  
  <p>What can I do to solve the "No module named cv2" issue?</p>
  
  <p>I also tried this straight in the command line</p>
  
  <pre><code>$python
  &gt;&gt;&gt;&gt;import cv2
  </code></pre>
  
  <p>which returns no module named cv2 and</p>
  
  <pre><code>$python3
  &gt;&gt;&gt;&gt;import cv2
  </code></pre>
  
  <p>which returns no module named cv2 as well.</p>
  
  <p>I am however totally able to compile my C++ code. Which means the installation was somehow successful, but something fails on the Python side.</p>
  
  <p>related to my issue: <a href="https://devtalk.nvidia.com/default/topic/809406/jetson-tk1-opencv-python-quot-import-cv2-quot-/?offset=4#5207884" rel="nofollow noreferrer">https://devtalk.nvidia.com/default/topic/809406/jetson-tk1-opencv-python-quot-import-cv2-quot-/?offset=4#5207884</a></p>
  
  <p>and</p>
  
  <p><a href="https://devtalk.nvidia.com/default/topic/1023652/jetson-tx2/how-can-i-run-quot-pip-install-opencv-python-quot-/?offset=5#5207902" rel="nofollow noreferrer">https://devtalk.nvidia.com/default/topic/1023652/jetson-tx2/how-can-i-run-quot-pip-install-opencv-python-quot-/?offset=5#5207902</a></p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I was suggested to run cmake with this flag set <code>-DBUILD_opencv_python2=ON</code>, 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 <code>Manually specified variables were not used by the project: BUILD_opencv_python</code></p>