gpt4 book ai didi

python - rpy2 不工作 - 需要 libiconv.so.2

转载 作者:太空狗 更新时间:2023-10-29 20:53:23 26 4
gpt4 key购买 nike

我有一个相对较新的 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,为什么不能直接使用?

最佳答案

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

关于python - rpy2 不工作 - 需要 libiconv.so.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42222085/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com