gpt4 book ai didi

r - 在 R 上安装 TensorFlow

转载 作者:行者123 更新时间:2023-12-04 02:45:44 26 4
gpt4 key购买 nike

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

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, ...)

最佳答案

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

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

然后

library(tensorflow)
install_tensorflow()

我使用 conda 而不是 venvs。

关于r - 在 R 上安装 TensorFlow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57353429/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com