我一直在尝试为osx安装opencv3。我需要它用于python 3(目前使用anaconda)。
我尝试了以下内容:
localhost:~ nicolas$ brew install opencv3
Warning: You are using OS X 10.8.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Installing opencv3 from homebrew/science
==> Installing dependencies for homebrew/science/opencv3: homebrew/python/numpy
==> Installing homebrew/science/opencv3 dependency: homebrew/python/numpy
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Downloading https://files.pythonhosted.org/packages/e0/4c/515d7c4ac424ff38cc919f
Already downloaded: /Users/nicolas/Library/Caches/Homebrew/numpy-1.11.1.tar.gz
==> Downloading https://pypi.python.org/packages/source/n/nose/nose-1.3.7.tar.gz
Already downloaded: /Users/nicolas/Library/Caches/Homebrew/numpy--nose-1.3.7.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/
==> python setup.py build --fcompiler=gnu95 --parallel=1 install --prefix=/usr/local
==> python -c import numpy; assert numpy.test().wasSuccessful()
Last 15 lines from /Users/nicolas/Library/Logs/Homebrew/numpy/03.python:
TypeError: 'buffer' does not have the buffer interface
----------------------------------------------------------------------
Ran 5757 tests in 65.851s
FAILED (KNOWNFAIL=6, SKIP=11, errors=1)
Running unit tests for numpy
NumPy version 1.11.1
NumPy relaxed strides checking option: False
NumPy is installed in /usr/local/Cellar/numpy/1.11.1/lib/python2.7/site-packages/numpy
Python version 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]
nose version 1.3.7
Traceback (most recent call last):
File "<string>", line 1, in <module>
AssertionError
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-python/issues
These open issues may also help:
Numpy HEAD builds require cython https://github.com/Homebrew/homebrew-python/issues/330
Warning: You are using OS X 10.8.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
首先,我不确定这意味着什么。这是成功还是失败?当我启动python时,我无法导入cv2,所以我认为它无法正常工作。如何找到失败原因的更多信息?
为什么有对python 2的引用?我的标准python目前是python 3(当我输入'python'时启动)。