簡體   English   中英

通知R包keras的Python正確位置

[英]Inform the R package keras of the correct location of Python

我在R 3.3.3 Windows 64位中安裝了keras和TensorFlow:

devtools::install_github("rstudio/keras")
library(keras)
install_tensorflow()

它沒有問過我Python的位置。 Python的正確位置在我的PATHPYTHONPATH作為D:/Python35/

但是當我去使用像keras功能時

model <- keras_model_sequential() 

它會拋出錯誤消息,說它無法找到DLL並將AppData中的路徑提供給Anaconda Python的舊的已刪除副本。

py_initialize出錯(config $ python,config $ libpython,config $ pythonhome,:
C:/Users/hackr/AppData/Local/CONTIN〜1/ANACON〜1/python35.dll - 找不到指定的過程。

如何告訴它使用正確的Python安裝?

這是很好的描述在這里

您可以使用:

library(reticulate)
use_python("D:/Python35/")

而設置RETICULATE_PYTHON環境變量到D:/Python35

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM