ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Python segfaults on OS X.10 with Indigo and brew

asked 2014-11-27 03:21:21 -0500

Michael gravatar image

Hello all,

I've installed ROS indigo, following the standard install on the site, on a Mac OS X 10 (Yosemite). Whenever I try to run python scripts such as rostopic or rosrun rqt_graph rqt_graph, I get the following error:

Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

I understand that this has something to do with conflicting python versions between Homebrew and Mac OS X. Is there anything I can do now, short of re-installing ROS again?


edit retag flag offensive close merge delete


Having the same issue.

Tom Moore gravatar image Tom Moore  ( 2014-11-27 08:21:13 -0500 )edit

Unfortunately I think you need to recompile everything, since all the packages which built against Python need to be built using the headers from the Python interpreter you're going to link against.

William gravatar image William  ( 2014-11-27 08:21:44 -0500 )edit

@William: I rebuilt everything just now, but am getting the same error. Do I need to do something with Python before recompiling? I tried doing a brew reinstall boost --with-python before building.

Tom Moore gravatar image Tom Moore  ( 2014-11-27 09:38:22 -0500 )edit

@Tom Moore, I'm not sure, did you uninstall the Homebrew Python? or are you rebuilding because you now have the Homebrew Python?

William gravatar image William  ( 2014-12-02 07:36:21 -0500 )edit

I'm sorted now, thanks. I missed a step in the OS X instructions:

"Note: It is recommended to use the system python rather than homebrewed python because of problems with segmentation faults.

Tom Moore gravatar image Tom Moore  ( 2014-12-02 09:26:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-07-17 16:46:49 -0500

lubiluk gravatar image

In order to fix the problem, brew-python vs system-python, you can add the following options to catkin_make_isolated. This will tell CMake to link against brew-python.


Adjust the paths to match your version of python.

edit flag offensive delete link more


A similar strategy is shown at

m_jaeyoon_c gravatar image m_jaeyoon_c  ( 2018-07-14 17:11:11 -0500 )edit

Question Tools



Asked: 2014-11-27 03:21:21 -0500

Seen: 2,143 times

Last updated: Jul 17 '17