I'm running Mountain Lion which has Python 2.7.2 installed by default. I've set up a new virtual Python environment using this version of Python. I install a few packages using pip install such as numpy, matplotlib, ipython, and a few others. I've been trying to develop a script to load data from R and so I also install rpy2. When I start up Python in the terminal, I can import all the installed packages (e.g. numpy, matplotlib, etc.) and there are no problems. But when I enter either:
import pandas.rpy.common as com
or
import rpy2.robjects as objects
and then exit()
from Python, there is a segmentation fault 11 reported. This might not be too much of a problem is I were to enter each command separately at the Python prompt since the commands seem to be working OK. However, I can't run the commands as part of a longer script because the fault seems to cause the script to stop prematurely.
The version of pandas that is installed is 0.14.1 (previously 0.14.0 – same problem). The version of R is 3.1.1. I've tried reinstalling R and recreating new virtual environments with new installations of all the packages.
There's a lot of discussion about segmentation fault 11 resulting from changes introduced in Mavericks. But, I assume those issues shouldn't affect Mountion Lion. Any suggestions would be gratefully received.
On machines where a system R is installed (e.g with RStudio) together with rpy2 installed in an environment (e.g conda), the system one is used, and that might not be compatible with the one rpy2 was built with, causing seg faults. To diagnose if you have different R version which rpy2 is bundeled with, run:
See more info in this answer.