我终于在自己win10电脑上装上了rstudio(1年多过去了),然后想用conda给不同项目分别建立环境。我下载了anaconda安装后建立多个环境且设置了R版本,再打开Rstudio在 Tools-->Global Options-->General 那里切换使用的R,就发现找不到不同conda环境的R。既然知道conda每个环境目录,那就手动选择里面的R呗(linux思维),然后就把我rstudio完全整崩溃了,再也启动不了无奈重装了。
所以正确的方案是安装anaconda后用Aanaconda Powershell Prompt切换到你的目标环境(如conda activate R3.6),在你环境里安装rstudio(conda install rstudio),完成后键入rstudio启动。要注意两点,一是启动Aanaconda Powershell Prompt时有些用户需要 右键-->以管理员身份运行 才能成功启动rstudio,否则可能报错。第二点是启动rstudio后还需要手动去Tools那里切换R,然后再重启rstudio。









网友评论