我正在尝试使用rpy2,但当我“将rpy2.robjects导入为robjects”时,我收到了很多警告并出现此错误:
查找错误:找不到“显示”。这是整个错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/anaconda3/lib/python3.6/site-packages/rpy2/robjects/__init__.py", line 19, in <module>
from rpy2.robjects.robject import RObjectMixin, RObject
File "/Applications/anaconda3/lib/python3.6/site-packages/rpy2/robjects/robject.py", line 52, in <module>
class RObjectMixin(object):
File "/Applications/anaconda3/lib/python3.6/site-packages/rpy2/robjects/robject.py", line 66, in RObjectMixin
__show = rpy2.rinterface.baseenv.get("show")
LookupError: 'show' not found
我知道有人已经问了一个类似的问题,但这些答案对我没有帮助,我会发表评论,但是如果你回答这个问题,说明只是评论,所以我在这里问自己。
答案 0 :(得分:0)
我遇到了同样的问题,什么对我有用:
将R
版本更新为3.5.0
download R here
通过以下方式安装rpy2
软件包:
conda install -c r rpy2
pip install rpy2