Search code examples
kerasanacondaamazon-amimxnet

How can I install keras using anaconda with mxnet backend


How can I set keras's backend to be MXNet?

I have found only this installation guide, but after I install keras by hand in this way, Anaconda does not recognize this installation.

In other words, this command:

KERAS_BACKEND=mxnet python -c "from keras import backend"

works only in the "keras" installation folder.

Therefore, I can not use keras in a Jupyter Notebook, for example.

Do you know another way to install keras in order to be compatible with mxnet (as it is for example on aws's AMIs) ?


Solution

  • You can install keras for a given Anaconda env by first activating that env and then calling

    pip install -e .
    

    in keras folder. In the guide that you included the link to, this command would replace

    sudo python setup.py install
    

    which installs it system wide.