在RStudio中安装并调用reticulate包后,我可以运行repl_python()。但是,我收到错误消息“1L 中的错误:(nrow(t) - trim_tail):长度为 0 的参数”
示例:
> repl_python()
Python 3.10.1 (/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10)
Reticulate 1.37.0 REPL -- A Python interpreter in R.
Enter 'exit' or 'quit' to exit the REPL and return to R.
Error in 1L:(nrow(t) - trim_tail) : argument of length 0
然后,当我尝试在 Python shell 中导入 numpy 时,我得到:
> import numpy as np
Error in strsplit(formatted_python_traceback, "\n", fixed = TRUE) :
non-character argument
只是评论说我有同样的问题并且也在寻找答案......