This repository has been archived by the owner. It is now read-only.

OpenCV 3 macOS 10.12 Sierra QTKit not found build issue #4104

Closed
kushalj1997 opened this Issue Aug 24, 2016 · 19 comments

Comments

9 participants
@kushalj1997

kushalj1997 commented Aug 24, 2016

Indicate troubleshooting steps taken

  • [YES] Ran brew update and retried your prior step?
  • [YES] Ran brew doctor, fixed as many issues as possible and retried your prior step?
  • [YES] Checked that a similar issue hasn't already been filed?
  • [YES] Looked up the software bug tracker if reporting a build error?
  • [YES ] If you're seeing permission errors tried running sudo chown -R $(whoami) $(brew --prefix)?

Bug reports / build errors:

  • Brief summary of issue:

Running following command:

brew install opencv3 --with-ffmpeg --with-tbb --with-contrib

Terminal Output

[deleted]

When trying to build opencv 3 on mac os sierra.

brew install opencv3 --with-ffmpeg --with-tbb --with-contrib

brew gist-logs opencv3
https://gist.github.com/8801f33b26a3acd5447cdff16a156ff8

@tdsmith

This comment has been minimized.

Show comment
Hide comment
@tdsmith

tdsmith Aug 30, 2016

Contributor

upstream observed this is a duplicate of opencv/opencv#6913; pending fix is opencv/opencv#7159

Contributor

tdsmith commented Aug 30, 2016

upstream observed this is a duplicate of opencv/opencv#6913; pending fix is opencv/opencv#7159

@normanrz

This comment has been minimized.

Show comment
Hide comment
@normanrz

normanrz Sep 24, 2016

opencv/opencv#7159 has been merged. brew install opencv3 --HEAD --with-contrib just worked for me

opencv/opencv#7159 has been merged. brew install opencv3 --HEAD --with-contrib just worked for me

@fpdevil

This comment has been minimized.

Show comment
Hide comment
@fpdevil

fpdevil Sep 30, 2016

Thanks for the tip. Following worked for me on Sierra
brew reinstall opencv3 --HEAD --with-python3 --with-ffmpeg --with-tbb --with-contrib

fpdevil commented Sep 30, 2016

Thanks for the tip. Following worked for me on Sierra
brew reinstall opencv3 --HEAD --with-python3 --with-ffmpeg --with-tbb --with-contrib

@severinsimmler

This comment has been minimized.

Show comment
Hide comment
@severinsimmler

severinsimmler Sep 30, 2016

This also worked for me, @singamsetty. Thank you!

This also worked for me, @singamsetty. Thank you!

@EMacco

This comment has been minimized.

Show comment
Hide comment
@EMacco

EMacco Sep 30, 2016

I have been trying to install opencv on Sierra
Error: You must brew link cmake pkg-config openexr before homebrew/science/opencv3 can be installed
Please does anyone have a solution?

EMacco commented Sep 30, 2016

I have been trying to install opencv on Sierra
Error: You must brew link cmake pkg-config openexr before homebrew/science/opencv3 can be installed
Please does anyone have a solution?

@yorelog

This comment has been minimized.

Show comment
Hide comment
@yorelog

yorelog Oct 11, 2016

I solved the problem just append a flag --HEAD which will install the master branch of opencv.

pull requests #7266 of opencv had added the support of OSX AVFoundation , which is a replace framework of QTKit

yorelog commented Oct 11, 2016

I solved the problem just append a flag --HEAD which will install the master branch of opencv.

pull requests #7266 of opencv had added the support of OSX AVFoundation , which is a replace framework of QTKit

@virajago virajago referenced this issue Oct 18, 2016

Closed

OpenCV3 failed to build on MacOS 10.12 #5352

4 of 4 tasks complete
@jooni41

This comment has been minimized.

Show comment
Hide comment
@jooni41

jooni41 Oct 25, 2016

It gets installed but not working properly when I import opencv it shows the following error:
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/cv2.so, 2): Library not loaded: lib/libopencv_reg.3.0.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/cv2.so
Reason: image not found

jooni41 commented Oct 25, 2016

It gets installed but not working properly when I import opencv it shows the following error:
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/cv2.so, 2): Library not loaded: lib/libopencv_reg.3.0.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/cv2.so
Reason: image not found

@fpdevil

This comment has been minimized.

Show comment
Hide comment
@fpdevil

fpdevil Oct 25, 2016

Hi, could you please check if the opencv libraries are loading properly in the python repl ?

>>> import cv2
>>> cv2.__version__
'3.1.0-dev'

If not, you might have to check if the shared object cv2.so was created and properly linked under the site-packages

fpdevil commented Oct 25, 2016

Hi, could you please check if the opencv libraries are loading properly in the python repl ?

>>> import cv2
>>> cv2.__version__
'3.1.0-dev'

If not, you might have to check if the shared object cv2.so was created and properly linked under the site-packages

@Walid-Ahmed

This comment has been minimized.

Show comment
Hide comment
@Walid-Ahmed

Walid-Ahmed Oct 25, 2016

I installed without errors using
brew install opencv3 --HEAD

still I can not import CV2 and get the error "ImportError: No module named cv2"
I could not find cv2.so in /usr/local/lib/python2.7/site-packages/

Walid-Ahmed commented Oct 25, 2016

I installed without errors using
brew install opencv3 --HEAD

still I can not import CV2 and get the error "ImportError: No module named cv2"
I could not find cv2.so in /usr/local/lib/python2.7/site-packages/

@Walid-Ahmed

This comment has been minimized.

Show comment
Hide comment
@Walid-Ahmed

Walid-Ahmed Oct 25, 2016

Solved by running:-
brew install opencv3 --HEAD
echo /usr/local/opt/opencv3/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/opencv3.pth

Solved by running:-
brew install opencv3 --HEAD
echo /usr/local/opt/opencv3/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/opencv3.pth

@jooni41

This comment has been minimized.

Show comment
Hide comment
@jooni41

jooni41 Oct 25, 2016

its unable to import cv2 how can I be able to check the version

jooni41 commented Oct 25, 2016

its unable to import cv2 how can I be able to check the version

@EMacco

This comment has been minimized.

Show comment
Hide comment
@EMacco

EMacco Oct 25, 2016

I don't think so bro. I had to restore my El Capitan backup and then
installed opencv

On Monday, 24 October 2016, Santhoshkumar Sunderrajan <
notifications@github.com> wrote:

Is there a patch for OpenCv release version 3.0? Or I will have to start
using the develop?

Thanks.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#4104 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATbvVN_T1SYqUAcEnrsYEkPTvviZ5jyzks5q3QS1gaJpZM4JsNsF
.

EMacco commented Oct 25, 2016

I don't think so bro. I had to restore my El Capitan backup and then
installed opencv

On Monday, 24 October 2016, Santhoshkumar Sunderrajan <
notifications@github.com> wrote:

Is there a patch for OpenCv release version 3.0? Or I will have to start
using the develop?

Thanks.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#4104 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATbvVN_T1SYqUAcEnrsYEkPTvviZ5jyzks5q3QS1gaJpZM4JsNsF
.

@Walid-Ahmed

This comment has been minimized.

Show comment
Hide comment
@Walid-Ahmed

Walid-Ahmed Oct 25, 2016

did you try brew install opencv3 --HEAD

did you try brew install opencv3 --HEAD

@jooni41

This comment has been minimized.

Show comment
Hide comment
@jooni41

jooni41 Oct 25, 2016

Yupps I tried everything

jooni41 commented Oct 25, 2016

Yupps I tried everything

@Walid-Ahmed

This comment has been minimized.

Show comment
Hide comment
@Walid-Ahmed

Walid-Ahmed Oct 25, 2016

and
echo /usr/local/opt/opencv3/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/opencv3.pth ?

and
echo /usr/local/opt/opencv3/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/opencv3.pth ?

@jooni41

This comment has been minimized.

Show comment
Hide comment
@jooni41

jooni41 Oct 25, 2016

nothing is working I tried everything 3 or 4 times

jooni41 commented Oct 25, 2016

nothing is working I tried everything 3 or 4 times

@fpdevil

This comment has been minimized.

Show comment
Hide comment
@fpdevil

fpdevil Oct 26, 2016

The shared object should be created somewhere under python /usr/local/Cellar/opencv3/HEAD-XXXX/lib/python2.7/site-packages/cv2.cpython-35m-darwin.so which you can symbolically link from your python site-packages as cv2.so.

fpdevil commented Oct 26, 2016

The shared object should be created somewhere under python /usr/local/Cellar/opencv3/HEAD-XXXX/lib/python2.7/site-packages/cv2.cpython-35m-darwin.so which you can symbolically link from your python site-packages as cv2.so.

@jooni41

This comment has been minimized.

Show comment
Hide comment
@jooni41

jooni41 Oct 26, 2016

@singamsetty can you please guide me how? it will be really appreciable

jooni41 commented Oct 26, 2016

@singamsetty can you please guide me how? it will be really appreciable

@fpdevil

This comment has been minimized.

Show comment
Hide comment
@fpdevil

fpdevil Oct 27, 2016

Hi,

On my mac, I am using python3.x and here are the settings. Since you are using python 2.7, you might have to adjust the locations accordingly.

$ echo $PYTHONPATH
/usr/local/lib/python3.5/site-packages

I used the below command to install opencv3

brew install opencv --with-eigen --with-jasper --with-libtiff --with-qt --with-tbb --with-ffmpeg --with-opencl

This created a shared object under the below location

cd /usr/local/Cellar/opencv3/HEAD-6328076_4/lib/python3.5/site-packages/
$ ll|grep cv
-r--r--r--  1 sampathsingamsetty  staff   2.5M Sep 29 19:19 cv2.cpython-35m-darwin.so

I created a soft link to this object from my python site-packages dir as follows.

$ cd /usr/local/lib/python3.5/site-packages

$ ln -s /usr/local/Cellar/opencv3/HEAD-6328076_4/lib/python3.5/site-packages/cv2.cpython-35m-darwin.so cv2.so

$ ll|grep cv
lrwxr-xr-x    1 sampathsingamsetty  staff    94B Sep 29 19:28 cv2.so -> /usr/local/Cellar/opencv3/HEAD-6328076_4/lib/python3.5/site-packages/cv2.cpython-35m-darwin.so

Once done, I was able to use the python bindings normally.

fpdevil commented Oct 27, 2016

Hi,

On my mac, I am using python3.x and here are the settings. Since you are using python 2.7, you might have to adjust the locations accordingly.

$ echo $PYTHONPATH
/usr/local/lib/python3.5/site-packages

I used the below command to install opencv3

brew install opencv --with-eigen --with-jasper --with-libtiff --with-qt --with-tbb --with-ffmpeg --with-opencl

This created a shared object under the below location

cd /usr/local/Cellar/opencv3/HEAD-6328076_4/lib/python3.5/site-packages/
$ ll|grep cv
-r--r--r--  1 sampathsingamsetty  staff   2.5M Sep 29 19:19 cv2.cpython-35m-darwin.so

I created a soft link to this object from my python site-packages dir as follows.

$ cd /usr/local/lib/python3.5/site-packages

$ ln -s /usr/local/Cellar/opencv3/HEAD-6328076_4/lib/python3.5/site-packages/cv2.cpython-35m-darwin.so cv2.so

$ ll|grep cv
lrwxr-xr-x    1 sampathsingamsetty  staff    94B Sep 29 19:28 cv2.so -> /usr/local/Cellar/opencv3/HEAD-6328076_4/lib/python3.5/site-packages/cv2.cpython-35m-darwin.so

Once done, I was able to use the python bindings normally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.