<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vladimir Sinitcin on Medium]]></title>
        <description><![CDATA[Stories by Vladimir Sinitcin on Medium]]></description>
        <link>https://medium.com/@satchitananda?source=rss-239c73a76ef4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EqxfRxj5L_GDu68njdH62Q.jpeg</url>
            <title>Stories by Vladimir Sinitcin on Medium</title>
            <link>https://medium.com/@satchitananda?source=rss-239c73a76ef4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 02:21:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@satchitananda/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setting up OpenCV for Python 3 on macOS Sierra with 5 easy steps]]></title>
            <link>https://medium.com/@satchitananda/setting-up-opencv-for-python-3-on-macos-sierra-with-5-easy-steps-647b64c5e0c9?source=rss-239c73a76ef4------2</link>
            <guid isPermaLink="false">https://medium.com/p/647b64c5e0c9</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[opencv]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[suitapp]]></category>
            <dc:creator><![CDATA[Vladimir Sinitcin]]></dc:creator>
            <pubDate>Thu, 06 Oct 2016 08:51:48 GMT</pubDate>
            <atom:updated>2016-10-06T09:02:24.432Z</atom:updated>
            <content:encoded><![CDATA[<p>At SuitApp we’re making a couple of things related with computer vision and of course we’re using OpenCV for that tasks. Earlier I had to make a lot of efforts to setup OpenCV with mine Python 3.5: Download sources, configure, find solutions to make it compile well… And after upgrading to macOS Sierra I had to make this setup again, but fortunately I found more convenient way to do it.</p><p>But no worries, I will share shortcut with you.</p><p>We need homebrew, virtualenv, some additional formulas and a bit of console.</p><h4>Step 1 (if you have no homebrew)</h4><p>Installing homebrew by running command in console:</p><pre>/usr/bin/ruby -e &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&quot;</pre><h4>Step 2 (optional)</h4><p>This step is optional if you already have python3</p><pre>brew install python3</pre><h4>Step 3</h4><p>Obtaining formulas for science</p><pre>brew tap homebrew/science</pre><h4>Step 4</h4><p>Installing opencv3 with all options we need</p><pre>brew install opencv3 --with-contrib --with-python3</pre><p>Those options <strong>with-contrib</strong> and <strong>with-python3</strong> just for my setup. Here is a list of available ones which may be useful for you.</p><pre>--32-bit<br>    Build 32-bit only<br>--c++11<br>    Build using C++11 mode<br>--with-contrib<br>    Build &quot;extra&quot; contributed modules<br>--with-cuda<br>    Build with CUDA support<br>--with-ffmpeg<br>    Build with ffmpeg support<br>--with-gphoto2<br>    Build with gphoto2 support<br>--with-gstreamer<br>    Build with gstreamer support<br>--with-jasper<br>    Build with jasper support<br>--with-java<br>    Build with Java support<br>--with-libdc1394<br>    Build with libdc1394 support<br>--with-opengl<br>    Build with OpenGL support (must use --with-qt5)<br>--with-openni<br>    Build with openni support<br>--with-openni2<br>    Build with openni2 support<br>--with-python3<br>    Build with python3 support<br>--with-qt<br>    Build the Qt4 backend to HighGUI<br>--with-qt5<br>    Build the Qt5 backend to HighGUI<br>--with-quicktime<br>    Use QuickTime for Video I/O instead of QTKit<br>--with-tbb<br>    Enable parallel code in OpenCV using Intel TBB<br>--without-eigen<br>    Build without eigen support<br>--without-numpy<br>    Use a numpy you&#39;ve installed yourself instead of a Homebrew-packaged numpy<br>--without-opencl<br>    Disable GPU code in OpenCV using OpenCL<br>--without-openexr<br>    Build without openexr support<br>--without-python<br>    Build without Python support<br>--without-tests<br>    Build without accuracy &amp; performance tests<br>--HEAD<br>    Install HEAD version</pre><h4>Step 5</h4><p>All that we have left to do now is to add opencv3 to our virtualenv (if we’ve created one).</p><p>We need to rename compiled cv2 module to appropriate one.</p><p>By locating console to opencv dir:</p><pre>cd /usr/local/opt/opencv3/lib/python3.5/site-packages</pre><pre>mv cv2.cpython-35m-darwin.so ./cv2.so</pre><p>Then we’re just adding path to this lib to our virtualenv</p><pre>echo &#39;/usr/local/opt/opencv3/lib/python3.5/site-packages&#39; &gt;&gt; ~/.virtualenvs/suitapp/lib/python3.5/site-packages/opencv3.pth</pre><p>Where <strong>~/.virtualenvs/suitapp/lib/python3.5/site-packages/ </strong>is path to your own virtualenv.</p><p>And now we can activate our virtualenv and try to import cv2 to check that everything is working.</p><pre>workon suitapp<br>python -c &quot;import cv2&quot;</pre><p>If there is no error, my congratulations — we did it!</p><p>P.S. Feel free to fix my English, or any other mistakes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=647b64c5e0c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>