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
  • 21,733
  • 19
  • 84
  • 102
Marcus Richard
  • 33
  • 1
  • 2
  • 5

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
  • 5,771
  • 1
  • 14
  • 45