我在R下安装了TensorFlow 2.2.0、Keras 2.3.0和Reticate1.16。
但是当我使用TensorFlow时,仍然会出现这个错误: Error: Installation of TensorFlow not found。我相信它来自安装了TensorFlow的Python3.6。如何在r-reticulate中更新Python版本?
> library(tensorflow)
> library(reticulate)
> use_condaenv("r-reticulate", required = TRUE)
> py_discover_config("tensorflow")
python: C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate/python.exe
libpython: C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate/python36.dll
pythonhome: C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate
version: 3.6.10 |Anaconda, Inc.| (default, May 7 2020, 19:46:08) [MSC v.1916 64 bit (AMD64)]
Architecture: 64bit
numpy: C:/Users/Mezeix/AppData/Local/r-miniconda/envs/r-reticulate/Lib/site-packages/numpy
numpy_version: 1.19.1
tensorflow: C:\Users\Mezeix\AppData\Local\R-MINI~1\envs\R-RETI~1\lib\site-packages\tensorflow\__init__.p
> tf$constant("Hellow Tensorflow")
Error: Installation of TensorFlow not found.
Python environments searched for 'tensorflow' package:
C:\Users\Mezeix\AppData\Local\r-miniconda\envs\r-reticulate\python.exe
You can install TensorFlow using the install_tensorflow() function.发布于 2021-08-31 04:18:31
install.packages("tensorflow")#install the tensorflow R package from GitHub
library(tensorflow)
install_tensorflow()#missed step
library(tensorflow)
tf$constant("Hellow Tensorflow")有关更多详细信息,请访问- https://tensorflow.rstudio.com/installation/
发布于 2020-08-29 13:15:51
尝试:
library(tensorflow)
install_tensorflow()然后:
library(tensorflow)
tf$constant("Hellow Tensorflow")工作?
https://stackoverflow.com/questions/63642746
复制相似问题