尝试使用 Python 或 Julia 时 RStudio 崩溃

RStudio crashing when trying to use Python or Julia

每当我尝试使用 Python(anaconda 或 Python)或 Julia 等不同的语言引擎时,

RStudio 就会崩溃。我可以 运行 library(reticulate)library(JuliaCall) 但是当我真正开始输入代码块并尝试执行 python 或 julia 代码时,会话崩溃了。

对于 Julia,我收到第一条消息说,

"Error Autosaving File. RStudio was unable to autosave this file. You may need to restart RStudio."

然后我得到

"R Session Aborted"

带有炸弹和 'Start New Session' 按钮的消息。 RStudio 中未提供任何代码或其他消息。

我已经多次卸载并重新安装 R、Python 和 Julia,但没有解决。

例如,当我尝试使用纯 R 和 Julia 时,输出如下(不幸的是 Python 没有消息)。我对在 RStudio 中 Python up 和 运行ning 更感兴趣。

library(JuliaCall)
julia_setup()

Julia version 1.6.3 at location /Applications/Julia-1.6.app/Contents/Resources/julia/bin will be used.

*** caught segfault *** address 0xfffffffffffffff8, cause 'memory not mapped'

Traceback: 1: juliacall_initialize(.julia$dll_file, .julia$bin_dir, img_abs_path) 2: julia_setup()

Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace ERROR: Selection:

Macbook Pro 
Processor - 2.6 GHz 6-Core Intel Core i7
Memory - 2 GB 2667 MHz DDR4
OS - MacOS Big Sur v11.6
R version 4.1.1
Rstudio 2021.09.0 Build 351
Anaconda version 1.7.2
Julia 1.6

我遇到了同样的问题(使用 library(reticulate)),使用与您报告的相同版本的 R、RStudio 和 MacOS。我的问题是通过安装以前版本的 RStudio 解决的,即版本 1.4.1717.

运行 我在 R 控制台或与 R 捆绑的 IDE 中的代码也有效。