Question: HI! I'm trying to install opencv and use it with python, but when I compile it I get no errors but I can't import cv module from python:

```
patrick:release patrick$ python
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named cv

```

The code I used to compile it is this:

```
cd opencv
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON
make
sudo make install

```

how can I get it working with python?

Answer: 
I found here a way to install opencv for python: <http://recursive-design.com/blog/2010/12/14/face-detection-with-osx-and-python/> :)
This worked for me (change python36 to whatever version you want)

`sudo port install opencv +avx2 +python36 +qt5 +contrib +eigen`

I got [this error](https://trac.macports.org/ticket/53427#no1) and had to apply the patch there ([download link](https://trac.macports.org/raw-attachment/ticket/53427/patch-cpp11-narrowing-error.diff))

Apply the patch with:

```
sudo patch /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/opencv-3.2.0/modules/highgui/src/window_QT.cpp ~/Downloads/patch-cpp11-narrowing-error.diff

```

Then run `sudo port install -N opencv +avx2 +python36 +qt5 +contrib +eigen` again