Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install opencv on mac to test go samples #88

Open
maxfridbe opened this issue Oct 20, 2016 · 1 comment
Open

How to install opencv on mac to test go samples #88

maxfridbe opened this issue Oct 20, 2016 · 1 comment

Comments

@maxfridbe
Copy link

I'm new to go and opencv
To install open cv I did:

brew tap homebrew/science
brew install opencv
go run hellocv.go 

Results in

# pkg-config --cflags opencv opencv opencv opencv opencv opencv opencv
pkg-config: exec: "pkg-config": executable file not found in $PATH
@LihMeh
Copy link

LihMeh commented Feb 11, 2018

That's what helped me

  1. You need pkg-config to be installed

brew install pkg-config

  1. You have to install opencv 2 instead of opencv 3 (Opencv 3 is not supported)

brew remove opencv
brew install opencv@2

  1. You need pkg_config to be able to to find you library. Since it's it unusual place, you have to set it manually

export PKG_CONFIG_PATH="/usr/local/opt/opencv@2/lib/pkgconfig"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants