当我做>>> from rpy2.robjects import r
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/dist-packages/rpy2/robjects/__init__.py", line 27, in <module> from . import language
File "/usr/local/lib/python3.6/dist-packages/rpy2/robjects/language.py", line 16, in <module> _str2lang = ri.baseenv['str2lang']
File "/usr/local/lib/python3.6/dist-packages/rpy2/rinterface_lib/conversion.py", line 44, in _ cdata = function(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/rpy2/rinterface_lib/_rinterface_capi.py", line 282, in _robj = function(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/rpy2/rinterface_lib/sexp.py", line 355, in __getitem__
raise KeyError("'%s' not found" % key)
KeyError: "'str2lang' not found"
时出现错误:
for(x in tab_list)
但是当我降级到3.2.0版时,一切正常。
有什么想法吗?
(Ubuntu 18.04,Python 3.6.8,rpy 3.3.2)