1

using this post: How to install Python 2.7 bindings for OpenCV using MacPorts for reference I installed opencv and numpy with

sudo port install numpy
sudo port install opencv +python27

This seemed to work, but if I do

import cv

in a python file and try to run it, I get this error:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import cv
ImportError: No module named cv

That post is a couple years old, so I wonder if it might be outdated, or more likely I just don't know what I'm doing.

A little more info. If I run

port installed opencv

I get

The following ports are currently installed:
  opencv @2.4.6_0+python27 (active)

So it looks like it's installed (?)

Community
  • 1
  • 1

1 Answers1

0

I uninstalled opencv, then did

sudo port install python27
sudo port install opencv +python27
sudo port select --set python python27

and it works