-->

rpy2, R and Ubuntu 12.04 - Invalid substring -fope

2019-05-10 23:36发布

问题:

What's the reason for the error when installing rpy2 on Ubuntu 12.04?

easy_install rpy2
Searching for rpy2
Reading http://pypi.python.org/simple/rpy2/
Best match: rpy2 2.3.9
Downloading https://pypi.python.org/packages/source/r/rpy2/rpy2-2.3.9.tar.gz#md5=86851a56f637e7b87709eb2b91dc5075
Processing rpy2-2.3.9.tar.gz
Running rpy2-2.3.9/setup.py -q bdist_egg --dist-dir /tmp/easy_install-DFDRi5/rpy2-2.3.9/egg-dist-tmp-7nyGO8
"/usr/lib/R/bin/R" CMD config --ldflags
Invalid substring
-fopenmp
in string
-Wl,--export-dynamic -fopenmp  -L/usr/lib/R/lib -lR -lpcre -llzma -lbz2 -lrt -ldl -lm
error: Setup script exited with Problem while running `"/usr/lib/R/bin/R" CMD config --ldflags`

回答1:

Edit: rpy2-2.3.10 is released. It contains the fix.

The fix should be in a bug fix release very soon. In the meantime, here is the solution proposed:

https://bitbucket.org/lgautier/rpy2/pull-request/28/fix-parsing-of-fopenmp-and-similar-config/diff