我试图安装R软件包fGarch,但似乎有问题。我用下面的命令:安装R软件包时出错fGarch
import rpy2.interactive as r
import rpy2.interactive.packages
rlib = r.packages.packages
r.packages.importr("utils")
package_name = "fGarch"
rlib.utils.install_packages(package_name)
安装大多去罚款,除了在最后的警告:
/home/vdesai/anaconda/lib/python2.7/site-packages/rpy2/robjects/packages.py:216: UserWarning: Conflict when converting R symbol in the package "tools" to a Python symbol (package.dependencies -> package_dependencies while there is already package_dependencies)
warn(msg)
当我尝试加载包:
%R library(fGarch)
我得到以下错误:
Error in library(fGarch) : there is no package called ‘fGarch’
In addition: Warning messages:
1: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘MASS’ had non-zero exit status
2: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘fBasics’ had non-zero exit status
3: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘fGarch’ had non-zero exit status
Error in library(fGarch) : there is no package called ‘fGarch’
请注意,从Rstudio使用此软件包不会造成任何困难。有人可以帮忙吗?