Error while installing Tensorflow in R

I am trying to install Tensorflow in R as explained here- I want to use Keras for deep learning in R.


library(tensor flow)


The first two lines worked but the last line gave the following error:-

Error: Prerequisites for installing TensorFlow not available.
Any idea how to resolve this? I have installed anaconda and python 3.6. And I am using Mac OS X.

You might try overriding the auto installation method with conda if you are using anaconda: