我在我的mac os x yosemite上安装了anaconda和conda软件包R. 当我输入
which R
Run Code Online (Sandbox Code Playgroud)
在我的终端,我得到以下输出
/Users/giovannisoldi/anaconda/bin/R
Run Code Online (Sandbox Code Playgroud)
所以它实际上链接到正确的版本.但是,当我打开RStudio时,我可以看到旧版本的R位于
/Library/Frameworks/R.framework/Versions/2.15/
Run Code Online (Sandbox Code Playgroud)
仍然使用.我尝试使用以下命令链接到Anaconda中当前版本的R:
ln -sfhv /Users/giovannisoldi/anaconda/bin/ /Library/Frameworks/R.framework/Versions/Current
Run Code Online (Sandbox Code Playgroud)
然而,通过这样做,RStudio抱怨它无法定位R.
有没有办法解决这个问题?
我是这样做的:
which R
/Users/admin/anaconda/bin/R
Run Code Online (Sandbox Code Playgroud)
在我~/.bashrc(或你的~/.bash_profile)我把这个:
export RSTUDIO_WHICH_R=/Users/admin/anaconda/bin/R
Run Code Online (Sandbox Code Playgroud)
然后 source ~/.bashrc
(你现在必须从终端打开RStudio)最后,你可以输入
rstudio
Run Code Online (Sandbox Code Playgroud)
或者你可以再次编辑~/.bashrc与alias rstudio='open -a RStudio .'现在的rstudio命令将在当前目录下打开RStudio.
| 归档时间: |
|
| 查看次数: |
4233 次 |
| 最近记录: |