我正试图在我的TensorFlow RStudio for Windows10上安装Windows10,并按照网站https://tensorflow.rstudio.com/installation/中的官方指示进行安装。
并且在官方网站TensorFlow https://www.tensorflow.org/install?hl=en中找到了必需的
我发现这仍然是一个尚未解决的问题,因为在以前的问题中,没有人能真正帮助(例如,R, TensorFlow, Anaconda Install on Windows)。
所以我在youtube上看了很多视频,读了很多,但还是什么也没读。当我跑步时:
library(remotes)
remotes::install_github("rstudio/tensorflow")
library(tensorflow)
install_tensorflow()
tf_config()
Installation of TensorFlow not found.
Python environments searched for 'tensorflow' package:
C:\Users\Simone\anaconda3\envs\r-reticulate\python.exe
C:\Users\Simone\anaconda3\python.exe
You can install TensorFlow using the install_tensorflow() function.我试了一遍又一遍按照官方网页上建议的方式
install.packages("tensorflow")
library(tensorflow)
install_tensorflow()
library(tensorflow)
tf$constant("Hellow Tensorflow")但同样的事情。我认为这是一个路径问题,但我不知道如何解决。想想我跑步的时候:
py_config() #then i get this
python: C:/Users/Simone/anaconda3/envs/r-reticulate/python.exe
libpython: C:/Users/Simone/anaconda3/envs/r-reticulate/python36.dll
pythonhome: C:/Users/Simone/anaconda3/envs/r-reticulate
version: 3.6.12 |Anaconda, Inc.| (default, Sep 9 2020, 00:29:25) [MSC v.1916 64 bit (AMD64)]
Architecture: 64bit
numpy: C:/Users/Simone/anaconda3/envs/r-reticulate/Lib/site-packages/numpy
numpy_version: 1.19.4
tensorflow: C:\Users\Simone\ANACON~2\envs\R-RETI~1\lib\site-packages\tensorflow\__init__.p
python versions found:
C:/Users/Simone/anaconda3/envs/r-reticulate/python.exe
C:/Users/Simone/anaconda3/python.exeC:\Users\Simone\ANACON~2\envs\R-RETI~1\lib\site-packages\tensorflow_init_.p中似乎安装了TensorFlow,但没有手动检查路径。python安装在一条路径上,tensorflow安装在另一条路径上
知道我该怎么解决路径问题吗?
谢谢!
EDIT1:我也注意到了来自install_tensorflow()的警告消息
WARNING: The script tensorboard.exe is installed in 'C:\Users\Simo\ANACON~2\envs\R-RETI~1\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.所以这就是我应该解决的问题,但不知道怎么解决
发布于 2022-07-28 02:29:02
我也遇到了在Rstudio中嵌入tensorflow的问题,但是我找到了一种方法来避免它,方法是在一个新的anaconda环境中安装tensorflow,然后激活Rstudio中的环境。它在我的计算机上工作(win 11,R4.2.1)。
conda创建-n tf-gpu tensorflow-gpu
conda激活tf-gpu
您可以通过以下方式在anaconda提示符中检查环境:
conda env list图书馆(“tensorflow”)
Use_condaenv(“tf”,required = TRUE)
tf$常数(“Hello Tensorflow!")”)
https://stackoverflow.com/questions/64774459
复制相似问题