[ros-users] crash importing opencv on mac python

Ken Conley kwc at willowgarage.com
Mon May 10 17:33:50 UTC 2010

Python has had a scattered history with OS X releases, making it a
problematic target. Snow Leopard brings Python up-to-date, but it
unfortunately creates compatibility issues with cross-platform graphical

One of the things that's being debated for C-Turtle is how to package Python
this time around. The options are:

1) status quo: py25-* packages via MacPorts
2) py26-* packages via MacPorts
3) easy_install for all Python packages, use system installation of Python

I'm starting to lean towards #3, based on the fact that I've experienced
numerous Python regressions with the MacPorts packages (e.g. ipython and
readline), but feedback is always welcome. I would like a solution that
works well with both 10.5 and 10.6, though the large discontinuity between
those OSX releases makes maintaining both difficult (even from a Python

 - Ken

On Mon, May 10, 2010 at 9:56 AM, Nicholas Butko <nbutko at ucsd.edu> wrote:

> Out of curiosity, what is the reason why ROS prefers MacPorts' version of
> Python to the OSX distribution?
> Sorry if this has been discussed before.
> --Nick
> On May 10, 2010, at 8:19 AM, Brian Gerkey wrote:
> > 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.
> > _______________________________________________
> > ros-users mailing list
> > ros-users at code.ros.org
> > https://code.ros.org/mailman/listinfo/ros-users
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100510/a9d13f6c/attachment-0003.html>

More information about the ros-users mailing list