I've recently switched from Windows to OSX. I have some scripts that use rpy2 that I have been unable to get working on OSX and I'm not sure how to troubleshoot any further. I've seen several other similar questions with the same segmentation fault error but most of them do not have accepted answers.
I use Anaconda(technically, miniconda) as a package manager and have installed R 3.3.2. The version of rpy2 I'm using is 2.8.5. I've installed Python (2.7.13) separately from a download from Python site so there's that separately from the miniconda version.
I use PyCharm as my IDE and I'm not 100% certain that the correct python executable is being used (I've read not to use the pre-installed mac one) but my python console shows "Continuum Analytics" so I don't thinks that's the problem. I've configured my interpreter to use the binary from the conda environment I setup for my project.
Here is the smallest amount of code that recreates the error...
These all work without an issue:
import rpy2
import rpy2.rinterface
import rpy2.rlike
All of these throw an error:
import rpy2.robjects
import rpy2.interactive
import rpy2.ipython
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)