Recommended python version on OS X with Homebrew

asked 2013-12-15 23:42:03 -0500

demmeln gravatar image

updated 2014-01-28 17:18:50 -0500

ngrennan gravatar image

As suggested in another questions http://answers.ros.org/question/108431/homebrew-python-versus-apple-python-os-x-mavericks-import-tf-segfaults-python/?comment=110341#comment-110341, I post this followup as a new question:

Running into some oddities of using brewed python 2.7, instead of the apple system one, I was strongly adviced to not use brewed python. I was woundering where the strong sugggestion against brewed python is coming from? Should this recommendation be made with homebrew in gernal, or just for ROS on OS X in particular? Is this more of an experience of various issues, or can people point me to list of things that break with brewed python?

I originally chose brewed python when installing homebrew since it seems slightlhy favoured, e.g. providing an easier upgrade path to future python patches https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python. Other than that I'm not particularly attached to using it over the system python.

However, it seems quite a pain to switch now. All installed packages from homebrew with python bindings need to be reinstalled. The page above names "just a few". Since I don't know which else, I'd probably resort to reinstalling all packages. Moreover I guess I would also need to reinstall all pip packages. And I would need to recompile all of ROS, or at lease everything with python bindings (however again I'm not sure how to easily determine the relevant packages, so all is a safe guess).

If people's experience is that brewed python has too many issues, then maybe that should be clearly stated in the install instructions?

edit retag flag offensive close merge delete

Comments

I've had some troubles running camera calibration package on Mac OSX with brewed python. After reinstalling all packages with system python the problem has gone. Some comments are here http://answers.ros.org/question/107936/python-choice-in-some-of-ros-packages/

Artem gravatar imageArtem ( 2013-12-16 01:51:21 -0500 )edit

You can actually have two versions of python, you just have to specify in .py file which one you want to use. I admit it is inconvenient, that's what's why for now I just removed brewed python.

Artem gravatar imageArtem ( 2013-12-16 01:52:44 -0500 )edit

Yes you can have both, but for example the python bindings of other homebrew packages cannot be used with both versions at the same time. Neither can your ros install. *Edit*: Second have of comment was a mix-up. Removed.

demmeln gravatar imagedemmeln ( 2013-12-16 03:41:34 -0500 )edit

I've read on the official python page that Python 2.7.6 aims at resolving some problems on Maverick but apparently I have had troubles using it as described above. As I've mentioned reinstalling everything and hiding /usr/local/lib/python2.7/site-packages resolved some of the issues.

Artem gravatar imageArtem ( 2013-12-16 03:50:45 -0500 )edit

I still have segmentation fault when executing stereo image proc, not idea what to blame..

Artem gravatar imageArtem ( 2013-12-16 03:51:42 -0500 )edit

I recommend using the system python over the brewed one, because I've run into less problems with it. My perspective is that the system python comes tuned for the OS and with a lot of apple provided python packages like numpy and others. I would not use the homebrew python unless you need it explicitly for something.

William gravatar imageWilliam ( 2013-12-16 08:43:20 -0500 )edit