[ros-users] crash importing opencv on mac python

Brian Gerkey gerkey at willowgarage.com
Mon May 10 15:19:11 UTC 2010


On Mon, May 10, 2010 at 7:58 AM, Dan Lazewatsky
<lazewatskyd at cse.wustl.edu> wrote:
> That's what I figured. Any idea how to tell OpenCV to build with a
> different version of Python?

If memory serves, I did it in the manner recommended in the wiki
(http://www.ros.org/wiki/ROS/Installation/OSX):
  sudo ln -s /opt/local/Library/Frameworks/Python.framework /Library/Frameworks/

The intent is to make the compiler prefer the MacPorts installation of
Python when it's given '-framework Python'.  The note below that
command indicates that we don't believe it to be the right solution:

"Note: The symlink step above can fail if you have a system
installation of a Python framework (which can happen with more recent
versions of OS X). Also, this is probably not the right way to adjust
the way that frameworks are located. We invite advice and ideas from
OS X users on this issue."

A bit of googling suggests the use the DYLD_FRAMEWORK_PATH environment
variable to change the linker's search path (see the man page for
dyld).  If you can make this work (e.g., setting
DYLD_FRAMEWORK_PATH=/opt/local/Library/Frameworks before building
OpenCV), please update the ROS OSX installation page.

	brian.



More information about the ros-users mailing list