9

我有一个相对较新的 anaconda 安装,其中我使用“conda install rpy2”安装了 rpy2。但是,当我尝试运行它时,出现此错误,例如:

> /[dir]/anaconda/bin/python -m 'rpy2.tests'
Traceback (most recent call last):
  File "/[dir]/anaconda/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/[dir]/anaconda/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "[dir]/anaconda/lib/python2.7/site-packages/rpy2/tests.py", line 23, in <module>
    import rpy2.tests_rpy_classic
  File "/[dir]/anaconda/lib/python2.7/site-packages/rpy2/tests_rpy_classic.py", line 3, in <module>
    import rpy2.rpy_classic as rpy
  File "/[dir]/anaconda/lib/python2.7/site-packages/rpy2/rpy_classic.py", line 5, in <module>
    import rpy2.rinterface as ri
  File "/[dir]/anaconda/lib/python2.7/site-packages/rpy2/rinterface/__init__.py", line 92, in <module>
    from rpy2.rinterface._rinterface import (baseenv,
ImportError: libiconv.so.2: cannot open shared object file: No such file or directory

这是什么 libiconv.so.2,为什么它不能直接从盒子里工作?

4

1 回答 1

13

我认为您需要conda install -c r libiconv或可能安装r-essentials包含 libiconv 的文件。

于 2017-05-29T20:59:58.117 回答