为什么在 RStudio 中运行 repl_python() 时出现此错误? “1L 中的错误:(nrow(t) - trim_tail):长度为 0 的参数”

问题描述 投票:0回答:1

在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
python r rstudio reticulate
1个回答
0
投票

只是评论说我有同样的问题并且也在寻找答案......

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.