Has anyone ever had OpenCV work with Python 2.7 on MacOS 10.6?

前端 未结 4 1847
无人及你
无人及你 2021-02-13 07:13

I\'ve been trying on and off for the past 6 months to get OpenCV to work with Python on MacOS. Every time there\'s a new release, I try again and fail. I\'ve tried both 64-bit a

4条回答
  •  广开言路
    2021-02-13 08:08

    Coincidentally, I did this yesterday, and it works now. I used the guide found here, in Section 2, "Building via Homebrew".

    Except, it says.

    sudo brew install python     ( the system python is not good enough)
    

    DO NOT ADD THIS LINE. It gave me so much trouble. Python 2.6.1 runs perfectly with OpenCV. By adding that line, homebrew installs Python2.7, and OpenCV will then bind to that version in stead of the default system version. You can then move the cv.so file, but you will still get the version mismatch error.

    I don't know why you were downvoted, it's a legitimate problem, perhaps people think you should take your problem to the OpenCV people.

提交回复
热议问题