相关疑难解决方法(0)

无法在OSX中的python中导入cv2

我在我的Mac上安装了OpenCV 3.1,也安装了cv2 pip install cv2.

vinllen@ $ pip install cv2
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already satisfied (use --upgrade to upgrade): cv2 in /usr/local/lib/python2.7/site-packages
Run Code Online (Sandbox Code Playgroud)

但看起来cv2cv不能使用:

Python 2.7.10 (default, Jul 13 2015, 12:05:58)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call …
Run Code Online (Sandbox Code Playgroud)

python opencv

26
推荐指数
3
解决办法
8万
查看次数

在小牛上安装opencv for python

我试图在Macbook Pro 2013年末与小牛队一起安装opencv.我没有找到任何二进制文件,所以我正在尝试构建它.
我试过http://www.guidefreitas.com/installing-opencv-2-4-2-on-mac-osx-mountain-lion-with-python-support
http://forums.udacity.com/questions/ 100021223/installed-opencv-on-os-x-mountain-lion
在调用时生成错误2
(CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:208)

在这个网站上搜索时,我在小牛队找到了opencv for python(我也尝试了自制软件,但是也产生了错误2,但没有任何进一步的信息)

我google了很多,但找不到任何解决方案对我有用.有没有人在小牛队上安装opencv?

谢谢

使用brew提供以下输出:

    brew install homebrew/science/opencv
    Warning: It appears you have MacPorts or Fink installed.
    Software installed with other package managers causes known problems for
    Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
    ==> Downloading http://downloads.sourceforge.net/project/opencvlibrary/opencv-un
    Already downloaded: /Library/Caches/Homebrew/opencv-2.4.6.1.tar.gz
    ==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/opencv/2.4.6.1 -DCMAKE_BUILD_
    ==> make
    cd /tmp/opencv-QBoi/opencv-2.4.6.1/macbuild/modules/stitching && /usr/local/Cellar/cmake/2.8.12/bin/cmake -E cmake_symlink_library ../../lib/libopencv_stitching.2.4.6.dylib ../../lib/libopencv_stitching.2.4.dylib ../../lib/libopencv_stitching.dylib
    /usr/local/Cellar/cmake/2.8.12/bin/cmake -E …
Run Code Online (Sandbox Code Playgroud)

python macos opencv osx-mavericks

7
推荐指数
1
解决办法
8112
查看次数

标签 统计

opencv ×2

python ×2

macos ×1

osx-mavericks ×1