Python3,Rpy2和R 3.1.1 ImportError未定义的符号

时间:2017-05-02 18:32:39

标签: r python-3.4 raspberry-pi3 rpy2

我使用pip并在运行Raspbian Jessie的覆盆子Pi 3上安装了RPy2。我有一个R 3.1.1的工作安装(尝试升级到更新版本,但似乎无法使其工作)。当我尝试运行python3 -m rpy2.tests时,我收到一个奇怪的错误。我收到以下错误:

$ python3 -m rpy2.tests
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.4/dist-packages/rpy2/tests.py", line 23, in 
<module>
    import rpy2.tests_rpy_classic
  File "/usr/local/lib/python3.4/dist-packages/rpy2/tests_rpy_classic.py", 
line 3, in <module>
    import rpy2.rpy_classic as rpy
  File "/usr/local/lib/python3.4/dist-packages/rpy2/rpy_classic.py", line 5, 
in <module>
    import rpy2.rinterface as ri
  File "/usr/local/lib/python3.4/dist-packages/rpy2/rinterface/__init__.py", 
line 92, in <module>
    from rpy2.rinterface._rinterface import (baseenv,
ImportError: /usr/local/lib/python3.4/dist-
packages/rpy2/rinterface/_rinterface.cpython-34m.so: undefined symbol: 
installChar

有人能指出我需要做些什么来解决这个问题吗? 谢谢!

1 个答案:

答案 0 :(得分:0)

我也有同样的错误:它最终归因于R(3.1.0或3.2.0)的版本。

更新到R 3.4.0修复了它。