To install Keras, you must also have an installation of TensorFlow on your system already. Keras can be installed easily using pip, as follows:
sudo pip install keras
For Python 3+ use the following command:
sudo pip3 install keras
During the writing of this book, the most recent version of Keras is version 2.0.2. You can check your version of Keras on the command line, using the following snippet:
python -c "import keras; print keras.__version__"
Running the preceding script, you will see the following output:
2.0.2
You can also upgrade your installation of Keras using the same method:
sudo pip install --upgrade keras