Question

I've tried for the better part of the last 6 months to get the rmagic functions extension running in ipython notebook -- I'm on a MacOS -- and when I try to load the rmagic the kernel crashes.

I was using rpy2 in a previous version of ipython notebook, but somewhere along the way the two stopped communicating. I have installed, reinstalled, reinstalled again, and smashed my head on the screen.

I've tried to update rpy2 from pip, easy_install, and compile from source.

This solution for windows didn't help me. This one didn't help either.

When I env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build install from source I get a segmentation fault.

Here's the error I've been getting:

sudo env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build install
running build
running build_py
running build_ext
Configuration for R as a library:
include_dirs: ('/Library/Frameworks/R.framework/Resources/include',)
libraries: ('Rblas', 'Rlapack')
library_dirs: ('/Library/Frameworks/R.framework/Resources/lib',)
extra_link_args: ('-framework R', '-F/Library/Frameworks/R.framework/..')
# OSX-specific (included in extra_link_args)
framework_dirs: ('-F/Library/Frameworks/R.framework/..',)
frameworks: ('-framework R',)
building 'rpy2.rinterface._rinterface' extension
cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-    aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch i386 -arch x86_64 -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 -I./rpy/rinterface -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Library/Frameworks/R.framework/Resources/include -c ./rpy/rinterface/_rinterface.c -o build/temp.macosx-10.9-intel-2.7/./rpy/rinterface/_rinterface.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1

Does anyone have any more recommendations I can try? Thanks so much for any advice.

Was it helpful?

Solution

Just set these environment variables before you build rpy2:

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

see here for more info.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top