如何在 SageMaker Notebook 实例上安装 R 包?
How do I install R packages on the SageMaker Notebook instance?
我尝试在 Sagemaker 中启动 R notebook 并输入
install.packages("disk.frame")
它给了我错误
also installing the dependencies ‘listenv’, ‘dplyr’, ‘rlang’, ‘furrr’,
‘future.apply’, ‘fs’, ‘pryr’, ‘fst’, ‘globals’, ‘future’
Warning message in install.packages("disk.frame"):
“installation of package ‘rlang’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘fs’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘pryr’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘fst’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘dplyr’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘disk.frame’ had non-zero exit status”
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
如何在 Sagemaker 上安装 R 包?
我认为您只需要指定一个存储库即可。例如,设置RStudio CRAN repo,我可以安装得很好。
install.packages("disk.frame", repo="https://cran.rstudio.com/")
感谢您使用 Amazon SageMaker。
此问题已解决,您应该可以使用
安装 R 包
install.packages("disk.frame")
或
install.packages("disk.frame", repo="https://cran.rstudio.com/")
我测试了它并且能够成功安装带有 ouput 的包
also installing the dependencies ‘listenv’, ‘benchmarkmeData’, ‘doParallel’, ‘bigassertr’, ‘bit’, ‘dplyr’, ‘rlang’, ‘furrr’, ‘future.apply’, ‘fs’, ‘pryr’, ‘fst’, ‘globals’, ‘future’, ‘benchmarkme’, ‘bigreadr’, ‘bit64’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
我在 sagemaker 实例上安装 odbc 时遇到了同样的错误。我试过了
remotes::install_github()
要么
devtools::install_github()
还有:
install.packages('odbc', 回购="https://cran.rstudio.com/")
几乎在每个实例中我都会收到相同的警告
“'odbc' 包的安装具有非零退出状态”更新 HTML 包在 '.Library' 中的索引
制作 'packages.html' ... 完成
如果我尝试调用包:
库 (odbc) 错误:没有名为“odbc”的包
回溯:
- 库(odbc)
如果您仍然 运行 遇到错误,我找到了解决它的方法。很简单。我在我已经创建的另一个 post 中回答了它。抱歉:
Error installing RODBC or ODBC on a Sagemaker Jupyter NoteBook Instance
我尝试在 Sagemaker 中启动 R notebook 并输入
install.packages("disk.frame")
它给了我错误
also installing the dependencies ‘listenv’, ‘dplyr’, ‘rlang’, ‘furrr’,
‘future.apply’, ‘fs’, ‘pryr’, ‘fst’, ‘globals’, ‘future’
Warning message in install.packages("disk.frame"):
“installation of package ‘rlang’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘fs’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘pryr’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘fst’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘dplyr’ had non-zero exit status”
Warning message in install.packages("disk.frame"):
“installation of package ‘disk.frame’ had non-zero exit status”
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
如何在 Sagemaker 上安装 R 包?
我认为您只需要指定一个存储库即可。例如,设置RStudio CRAN repo,我可以安装得很好。
install.packages("disk.frame", repo="https://cran.rstudio.com/")
感谢您使用 Amazon SageMaker。
此问题已解决,您应该可以使用
安装 R 包install.packages("disk.frame")
或
install.packages("disk.frame", repo="https://cran.rstudio.com/")
我测试了它并且能够成功安装带有 ouput 的包
also installing the dependencies ‘listenv’, ‘benchmarkmeData’, ‘doParallel’, ‘bigassertr’, ‘bit’, ‘dplyr’, ‘rlang’, ‘furrr’, ‘future.apply’, ‘fs’, ‘pryr’, ‘fst’, ‘globals’, ‘future’, ‘benchmarkme’, ‘bigreadr’, ‘bit64’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
我在 sagemaker 实例上安装 odbc 时遇到了同样的错误。我试过了 remotes::install_github() 要么 devtools::install_github()
还有: install.packages('odbc', 回购="https://cran.rstudio.com/")
几乎在每个实例中我都会收到相同的警告 “'odbc' 包的安装具有非零退出状态”更新 HTML 包在 '.Library' 中的索引 制作 'packages.html' ... 完成
如果我尝试调用包: 库 (odbc) 错误:没有名为“odbc”的包 回溯:
- 库(odbc)
如果您仍然 运行 遇到错误,我找到了解决它的方法。很简单。我在我已经创建的另一个 post 中回答了它。抱歉:
Error installing RODBC or ODBC on a Sagemaker Jupyter NoteBook Instance