0

I was working to install OpenCV to work with Python on my Mac http://www.jeffreythompson.org/blog/2013/08/22/update-installing-opencv-on-mac-mountain-lion/

I got everything installed without problems, but by the end I got this wired problem mentioning that the "OpenCV library" is not connected

$ pkg-config --cflags opencv
-I/usr/local/include/opencv -I/usr/local/include 

$ brew install opencv
Warning: opencv-2.4.6.1 already installed, it's just not linked

$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] 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
>>> import cv
DataT
  • 85
  • 1
  • 2
  • 7

2 Answers2

1

For what it's worth, I think you just missed a step in my instructions. You need to add the following line to your .bash_profile file in your Home folder (or create it if the file doesn't exist):

export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH

Be sure to restart Terminal before starting Python.

JeffThompson
  • 1,538
  • 3
  • 24
  • 47
0

see if this works for you....

http://samkhan13.wordpress.com/2012/06/18/using-opencv-with-python-on-your-mac-os-x/

samkhan13
  • 3,315
  • 2
  • 33
  • 54