Canopy and OpenCV on Mac OSX

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Canopy and OpenCV on Mac OSX

Jake Ross

Hi All

Im trying to use opencv with canopy but multiple attempts have been unsuccessful.
First, I tried installing pyopencv but I cannot compile boost.python with Canopy (32 or 64). Ive been using pyopencv and boost.python with EPD7.X no problem. Any Thoughts?

Then, I realized Canopy's package manager has OpenCV 2.4.2 so I tried that but importing cv fails.

Enthought Canopy Python 2.7.3 | 64-bit | (default, Mar 25 2013, 15:52:02)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv.py", line 1, in <module>
    from cv2.cv import *
ImportError: dlopen(/Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so, 2): Library not loaded: @executable_path/../Python
  Referenced from: /Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so
  Reason: image not found

The main reason I need opencv is for videocapture. This is the only way Ive been able to display a live video stream. Does any one know of a better option using pyside or anything else? I figured phonon would do the trick but it doesn't appear that the current pyside version has all the bindings(?)

Any thoughts/help would be great
Thanks
Jake

--
Jake Ross
NM Tech
[hidden email]
[hidden email]
575-835-5994 (office)

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Canopy and OpenCV on Mac OSX

Jake Ross
I was able to fix the ImportError using install_name_tool -change....

Following up on my own thoughts, I think using Canopy, OpenCV python bindings, and possibly skimage will be much better than solution then having to deal with boost. 




On Tue, May 7, 2013 at 12:29 AM, Jake Ross <[hidden email]> wrote:

Hi All

Im trying to use opencv with canopy but multiple attempts have been unsuccessful.
First, I tried installing pyopencv but I cannot compile boost.python with Canopy (32 or 64). Ive been using pyopencv and boost.python with EPD7.X no problem. Any Thoughts?

Then, I realized Canopy's package manager has OpenCV 2.4.2 so I tried that but importing cv fails.

Enthought Canopy Python 2.7.3 | 64-bit | (default, Mar 25 2013, 15:52:02)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv.py", line 1, in <module>
    from cv2.cv import *
ImportError: dlopen(/Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so, 2): Library not loaded: @executable_path/../Python
  Referenced from: /Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so
  Reason: image not found

The main reason I need opencv is for videocapture. This is the only way Ive been able to display a live video stream. Does any one know of a better option using pyside or anything else? I figured phonon would do the trick but it doesn't appear that the current pyside version has all the bindings(?)

Any thoughts/help would be great
Thanks
Jake

--
Jake Ross
NM Tech
[hidden email]
[hidden email]
<a href="tel:575-835-5994" value="+15758355994" target="_blank">575-835-5994 (office)



--
Jake Ross
NM Tech
[hidden email]
[hidden email]
575-835-5994 (office)

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Canopy and OpenCV on Mac OSX

Jake Ross
On Mac OSX execute the following command from the terminal

install_name_tool -change @executable_path/../Python $HOME/Library/Enthought/
Canopy_64bit/User/Python $HOME/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so


On Tue, May 7, 2013 at 12:53 AM, Jake Ross <[hidden email]> wrote:
I was able to fix the ImportError using install_name_tool -change....

Following up on my own thoughts, I think using Canopy, OpenCV python bindings, and possibly skimage will be much better than solution then having to deal with boost. 




On Tue, May 7, 2013 at 12:29 AM, Jake Ross <[hidden email]> wrote:

Hi All

Im trying to use opencv with canopy but multiple attempts have been unsuccessful.
First, I tried installing pyopencv but I cannot compile boost.python with Canopy (32 or 64). Ive been using pyopencv and boost.python with EPD7.X no problem. Any Thoughts?

Then, I realized Canopy's package manager has OpenCV 2.4.2 so I tried that but importing cv fails.

Enthought Canopy Python 2.7.3 | 64-bit | (default, Mar 25 2013, 15:52:02)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv.py", line 1, in <module>
    from cv2.cv import *
ImportError: dlopen(/Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so, 2): Library not loaded: @executable_path/../Python
  Referenced from: /Users/ross/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/cv2.so
  Reason: image not found

The main reason I need opencv is for videocapture. This is the only way Ive been able to display a live video stream. Does any one know of a better option using pyside or anything else? I figured phonon would do the trick but it doesn't appear that the current pyside version has all the bindings(?)

Any thoughts/help would be great
Thanks
Jake

--
Jake Ross
NM Tech
[hidden email]
[hidden email]
<a href="tel:575-835-5994" value="+15758355994" target="_blank">575-835-5994 (office)



--
Jake Ross
NM Tech
[hidden email]
[hidden email]
<a href="tel:575-835-5994" value="+15758355994" target="_blank">575-835-5994 (office)



--
Jake Ross
NM Tech
[hidden email]
[hidden email]
575-835-5994 (office)

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev