我已使用以下命令在conda env中安装了rpy2:
PATH=<path to R>:$PATH
LD_LIBRARY_PATH=<ldpath for R>:LD_LIBRARY_PATH
pip install rpy2
它的安装没有问题,但是,抛出以下错误:
python -m rpy2.tests
import rpy2.rinterface as ri
File "/home/common/apps/python/3.6/envs/py36/lib/python3.6/site-packages/rpy2/rinterface/__init__.py", line 51, in <module>
from rpy2.rinterface._rinterface import (baseenv,
ImportError: /home/common/apps/R/3.5.1/lib/R/lib/libR.so: undefined symbol: drot_
rpy2 / R版本的详细信息:*
rpy2 2.9.5 pypi_0 pypi
R was installed with openbals:
Installation directory: /home/common/apps/R/3.5.1
Interfaces supported: X11, tcltk
External libraries: readline, BLAS(OpenBLAS), curl
Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU
Options enabled: shared R library, shared BLAS, R profiling, memory profiling
通读(http://r.789695.n4.nabble.com/Error-when-compiling-R-with-openblas-td4693330.html),认为这与openblas版本不匹配有关。因此,我更新了openblas,并重新安装了R。但是,我仍然对错误保持怀疑。
这是在非常不同的上下文中出现的类似错误:
http://lists.pgfoundry.org/pipermail/plr-general/2012-March/000640.html