我正在尝试使用为 Windows 10 安装了 Keras 和 Tensorflow 的第一次 R 环境设置。此错误显示在 RStudio 中,但我也尝试以其他方式从 Anaconda 提示符执行此操作,即使没有错误我'无法正确导入 Tensorflow。在 RStudio 中:
> library(keras)
> install_keras(method = "conda", tensorflow = "gpu")
> Error: Installing Python packages into a virtualenv is not supported on Windows
Run Code Online (Sandbox Code Playgroud)
在“conda install -c conda-forge tensorflow”和“pip install --upgrade tensorflow-gpu”之后的Anaconda提示中:
(base) PS C:\Users\userx> conda activate renv
(renv) PS C:\Users\userx> python
Python 3.7.1 (default, Oct 28 2018, 08:39:03) [MSC v.1912 64 bit
(AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" …Run Code Online (Sandbox Code Playgroud)