installing opencv for python on mavericks

2024/10/8 12:40:19

I am trying to install opencv on a Macbook Pro late 2013 with mavericks. I didn't find any binaries so I am trying to build it.
I tried http://www.guidefreitas.com/installing-opencv-2-4-2-on-mac-osx-mountain-lion-with-python-support
and http://forums.udacity.com/questions/100021223/installing-opencv-on-os-x-mountain-lion
when calling make the error 2 is produced
(CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:208)

When searching on this website I found opencv for python on mavericks (I also tried homebrew which also produced error 2, but without any further information)

I googled a lot, but none of the found solutions worked for me. Does anyone have a tut for installing opencv on Mavericks?

Thank you

using brew gives the following output:

    brew install homebrew/science/opencvWarning: It appears you have MacPorts or Fink installed.Software installed with other package managers causes known problems forHomebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.==> Downloading http://downloads.sourceforge.net/project/opencvlibrary/opencv-unAlready 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_==> makecd /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 cmake_progress_report /tmp/opencv-QBoi/opencv-2.4.6.1/macbuild/CMakeFiles  90 91[100%] Built target opencv_stitchingmake[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2make: *** [all] Error 2READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshootingIf reporting this please do so at the homebrew/science tap (not mxcl/homebrew).

I solved the problem for me by using canopy (https://www.enthought.com/products/canopy/) which is free for students

Answer

You can install it with brew normally.

brew install homebrew/science/opencv

or

brew tap homebrew/science
brew install opencv

This is how I installed it on my mavericks and it worked fine.

https://en.xdnf.cn/q/70123.html

Related Q&A

Python 3 reading CSV file with line breaks in rows

I have a large CSV file with one column and line breaks in some of its rows. I want to read the content of each cell and write it to a text file but the CSV reader is splitting the cells with line brea…

Python appending dictionary, TypeError: unhashable type?

abc = {} abc[int: anotherint]Then the error came up. TypeError: unhashable type? Why I received this? Ive tried str()

Calling C# code within Python3.6

with absolutely no knowledge of coding in C#, I wish to call a C# function within my python code. I know theres quite a lot of Q&As around the same problem, but for some strange reason, im unable t…

Pycharm 3.4.1 - AppRegistryNotReady: Models arent loaded yet. Django Rest framewrok

Im using DRF and Pycharm 3.4.1 and Django 1.7. When I try to test my serializer class via Pycharm django console, it gives me the following error:Codefrom items_app.serializers import ItemSerializer s …

Pass Flask route parameters into a decorator

I have written a decorator that attempts to check we have post data for a Flask POST route:Heres my decorator:def require_post_data(required_fields=None):def decorator(f):@wraps(f)def decorated_functio…

update env variable on notebook in VsCode

I’m working on a python project with a notebook and .env file on VsCode. I have problem when trying to refresh environment variables in a notebook (I found a way but its super tricky). My project: .en…

How do I properly set up flask-admin views with using an application factory?

Im trying to setup flask-admin model views with SQLAlchemy against user and role models. Instead of a function admin view Im getting:ValueError: Invalid model property name <class app.models.Role>…

Django Rest Framework: Correct way to serialize ListFields

Based on the DRF documentation I have a created a list of email_id stored in my model in the following way Models.pyclass UserData(models.Model):emails = models.CharField(max_length=100,blank=False)In…

Flask-SQLAlchemy TimeoutError

My backend configuration is :Ubuntu 12.04 Python 2.7 Flask 0.9 Flask-SQLAlchemy Postgres 9.2Ive got this error message: TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed ou…

Making saxon-c available in Python

I have just read that Saxon is now available for Python, and thats just great fun and good, but can anyone write a tutorial on how to make it available for Python/Anaconda/WingIDE or similar? I am use…