3

尝试使用 R 内核在 Google Cloud AI Platform notebooks 中通过install_tensorflow安装 TensorFlow:

platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          6.1                         
year           2019                        
month          07                          
day            05                          
svn rev        76782                       
language       R                           
version.string R version 3.6.1 (2019-07-05)
nickname       Action of the Toes

我跑:

install.packages(c("tfestimators", "tfdatasets", "cloudml", "rjson"))
library(tfestimators) # used for creating tensorflow estimators
library(tfdatasets) # used for creating data input functions
library(cloudml) # used for training and deploying models to AI Platform
install_tensorflow()

我得到:

Error in virtualenv_install(envname, packages, ...): unused arguments (python_version = conda_python_version, pip = TRUE)Traceback:1. install_tensorflow()2. reticulate::py_install(packages = c(package, extra_packages), . envname = envname, method = method, conda = conda, python_version = conda_python_version, . pip = TRUE, ...)
4

1 回答 1

5

我在尝试为 R 安装 Keras 时遇到了同样的错误。从 CRAN 更新到最新的网状版本和从 Github 更新到最新的 tensorflow 版本解决了这个问题:

install.packages("reticulate")
devtools::install_github("rstudio/tensorflow")

接着

library(tensorflow)
install_tensorflow()

我使用 conda 而不是 venvs。

于 2019-08-05T14:17:01.293 回答