alexanderquispe / ml_book

https://alexanderquispe.github.io/ml_book/
0 stars 1 forks source link

Problems with keras package in R #35

Open ecirilomendoza opened 2 years ago

ecirilomendoza commented 2 years ago

When calling keras package in R (using reticulate), you might have some problems like the one in the snapshot.
image

It means there is not tensorflow package in Python: you must install tensorflow in your current environment in Anaconda. However, there are problems when installing tensorflow in the base environment (default environment in Anaconda). Therefore, we highly recommend to set another environment to run Python scripts (and to use reticulate in R).

Once you've created an environmentenvironment (say "tenskeras" as an example). You must set the environment before using reticulate in R. It can be accomplished by typing in the R console before rendering the chapter.

Sys.setenv(RETICULATE_PYTHON = "C:\\Users\\Elibeth\\anaconda3\\envs\\tenskeras\\python.exe")

When setting the new environment (in our case, "tenskeras"), you must install the packages once again on this env.

ecirilomendoza commented 2 years ago
When installing the packages once again in the new environment, make sure you are installing the following versions of: Package Version
matplotlib 3.3.4
scikit-learn 0.24.1