【问题标题】:Initiation issue in tensorflow library张量流库中的启动问题
【发布时间】:2021-10-30 01:21:20
【问题描述】:

我必须安装“tensorflow”和“keras”库,但是当我尝试使用它们时,我收到了以下错误消息:

> library(tensorflow)
> tf$constant("Hellow Tensorflow")
Error in system2(python, stdout = TRUE, args = c("-c", shQuote("import sys; import platform; sys.stdout.write(platform.architecture()[0])"))) : 
  'CreateProcess' failed to run 'C:\Python27\ArcGIS10.8\python.exe -c "import sys; import platform; sys.stdout.write(platform.architecture()[0])"'

我假设我需要更改 SYSTEM 路径中的某些内容,但是什么?

【问题讨论】:

  • 你是如何安装 tensorflow 的,我记得这是一个两步过程,你可能做得对,但考虑到你的输出,很难说。
  • 在“R”中,我安装了“install.package(tensorflow)”,当我通过“library(tensorflow)”午餐时它没有给出错误。当我尝试使用 ir 中的函数时出现错误
  • 曾经有一个 next step,因为 install.packages 本质上安装了一个安装程序,在调用 install_tensorflow() 后运行一次 library(tensorflow),查看 github 自述文件,虽然它可能有改变了。

标签: r tensorflow keras


【解决方案1】:

看起来 reticulate 找到了与您的 ArcGis 安装捆绑在一起的 Python 2 版本。 TensorFlow 与 python 2 不兼容。

如果你想通过 R/reticulate 来配置一个兼容的 python 环境,你可以运行这个:

reticulate::install_miniconda()
keras::install_keras()

【讨论】:

猜你喜欢
  • 2016-10-18
  • 1970-01-01
  • 2016-06-17
  • 2021-02-01
  • 2021-08-21
  • 2018-06-10
  • 2021-10-27
  • 2020-12-10
相关资源
最近更新 更多