【发布时间】:2021-02-26 20:51:15
【问题描述】:
我尝试在R中使用keras,当我尝试调用flow_images_from_dataframe()时出现错误:
Error in flow_images_from_dataframe() :
Pandas (python module) must be installed in the same environment as Keras.Install it using reticulate::virtualenv_install("pandas", envname = "r-tensorflow") or reticulate::conda_install("pandas", envname = "r-tensorflow") depending on the kind of environment you are using.
我尝试了以下方法:
reticulate::py_module_available("pandas")
# FALSE.
# checking that environment is there:
reticulate::virtualenv_list()
# "r-reticulate" "r-tensorflow"
# activate the environment:
use_virtualenv('r-tensorflow')
reticulate::virtualenv_install("pandas", envname = "r-tensorflow")
# ...
# ...
# Installing collected packages: pandas
# Successfully installed pandas-1.1.5
# Trying again:
py_module_available("pandas")
# FALSE
# The issue is specific to pandas, other modules are fine:
reticulate::py_module_available('scipy')
# TRUE
【问题讨论】:
标签: r pandas keras rstudio reticulate