1

I am trying to install xbob.flandmarks using "pip install xbob.flandmark". When I do so I get the following error:

RuntimeError: PkgConfig did not find package opencv. Output:

Package opencv was not found in the pkg-config search path.

Perhaps you should add the directory containing `opencv.pc'

to the PKG_CONFIG_PATH environment variable

No package 'opencv' found

This is a somewhat common error (see here and here). I have tried the solution these links propose (adding the opencv.pc file to my PKG_CONFIG_PATH both by exporting it in the shell (export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/Cellar/opencv/2.4.8.2/lib/pkgconfig/) and by adding the line to my ~/.bashrc file. I have also tried using the opencv.pc file stored in the homebrew Cellar as well as in /usr/local/lib/pkgconfig.)

Any suggestions would be greatly appreciated.

2
  • is the output of pkg-config --libs --cflags opencv empty? Commented May 15, 2014 at 7:14
  • Forgot to mention that I'm running on mac (I assume this is the reason --libs returns command not found) Commented May 15, 2014 at 21:38

2 Answers 2

1

Type pip install opencv-python.

It should be good.

Sign up to request clarification or add additional context in comments.

Comments

1

I would got with pip install opencv-contrib-python

The opencv-contrib-python repository contains both the main modules along with the contrib modules — this is the library I recommend you install as it includes all OpenCV functionality. This could make sure you cover the stuff making your error above.

Ref: https://www.pyimagesearch.com/2018/09/19/pip-install-opencv/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.