0

I am new to R. I am trying to do one hot coding and am using to_categorical function and I am getting the error:

"Installation of Python not found, Python bindings not loaded"

I have already installed keras package and have loaded it as well. Even tried removing it and installing again.

This is my code:

trainy <- c(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2)

trainLabels <- to_categorical(trainy)

I also tried the following code and got the same error:

model <- keras_model_sequential()

Please let me know if you require any other details!
Thanks in advance.

MBT
  • 17,959
  • 17
  • 76
  • 99

1 Answers1

0

You probably should either install Anaconda or add it to the path. If the following: go to start menu / type cmd / open the command line / type python --version Doesn't give you something like:

Python 3.6.4 :: Anaconda, Inc.

Then you need to install Conda: go here and add it to your path after install by following this answer for detailed instructions

gaut
  • 2,299
  • 1
  • 11
  • 24