简体   繁体   中英

How do you install OpenCV3 on a mac, with both python2.7 and python3.6 bindings?

I have opencv3 installed on my mac, using Homebrew for the install, with python2.7 bindings. I now want to use some code that only works with python3, that also uses opencv3, but I don't want to break the python2.7 bindings as I have other code that relies on them. How do you install opencv3 on a mac with both python2.7 and python3.x bindings, or how do you add python3.x bindings to an existing install of opencv3 without breaking the python2.7 bindings?

  • I think opencv3.x is compatible with python3.x and is not compatible with python2.x
  • If you want opencv to work with python2.x then then I would suggest you to download opencv2.x

  • If you are using anaconda and want to install opencv2.x version then run the following command : conda install -c menpo opencv3

  • You can refer to this link if you want to install opencv2.x with Homebrew : https://jjyap.wordpress.com/2014/05/24/installing-opencv-2-4-9-on-mac-osx-with-python-support/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM