0

我正在尝试按照本教程安装 opencv,但我找不到 ~/.profile 目录。它说我没有权限,当我 sudo 进入它时它说它找不到它但是当我看到它时。我不知道如何找到它。http://thepetitegeek.blogspot.com/2009/09/installing-opencv-on-mac-os-x-with.html

当我尝试执行 houghline

 File "houghlines.py", line 10, in <module>
    from ctypes_opencv.cv import *
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ctypes_opencv/__init__.py", line 18, in <module>
    from ctypes_opencv.cxcore import *
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ctypes_opencv/cxcore.py", line 80, in <module>
    _cxDLL, _cvDLL, _hgDLL = detect_opencv()    
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ctypes_opencv/cxcore.py", line 58, in detect_opencv
    cxDLL = cdll.LoadLibrary(find_lib('cxcore'))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ctypes_opencv/cxcore.py", line 54, in find_lib
    raise ImportError("OpenCV's shared library '%s' is not found. Make sure you have its path included in your PATH variable." % name)
ImportError: OpenCV's shared library 'cxcore' is not found. Make sure you have its path included in your PATH variable.
4

1 回答 1

0

~/.profile“目录”可能不存在。它是一个文件,您需要在您的用户目录中创建它。

于 2012-09-22T01:24:55.703 回答