Installation of OpenCV in Ubuntu 14.04
<p>I built OpenCV from Source but I can't manage to use it. Every time I try to even load an image with the next code I get <code>No module named cv2.cv</code>. Why is that happening? How can I fix it?</p>

<pre><code>from cv2.cv import *

img = LoadImage("/home/User/Desktop/Image.png")
NamedWindow("opencv")
ShowImage("opencv",img)
WaitKey(0)
</code></pre>

<p>The procedure I did was the following...</p>

<p>I downloaded the zip file from the main page of GitHub and while being in a destination directory I created, I built OpenCV using</p>

<p><code>cmake OpenCV_Source_Directory</code></p>

<p>Then on the destination directory I run</p>

<p><code>make</code></p>

<p><code>sudo make install</code></p>

<p>Presumable you did:</p>

<pre><code>git clone git@github.com:opencv/opencv.git
mkdir build; cd build
cmake ../opencv &amp;&amp; make &amp;&amp; sudo make install
</code></pre>

<p>But if you do this:</p>

<pre><code>cd opencv
git describe
</code></pre>

<p>You will get something like</p>

<pre><code>3.1.0-1374-g7f14a27
</code></pre>

<p>That is, the default branch is OpenCV 3, which doesn't have the cv2.cv module.
Either change your code to work with the OpenCV 3 cv2 module.
Or downgrade to OpenCV2. You can do this by:</p>

<pre><code>cd opencv
git checkout 2.4.13.1
cd ../build &amp;&amp; so on ...
</code></pre>

python opencv