install tensorflowa tensorflow with or without gpu support can be installed from pypi using pip here' the command without gpu supportsudo pip install tensorflow here' the command to install tensorflow with gpu supportsudo pip install tensorflow-gpu installing theano (optionalbecause you've already installed tensorflowyou don' have to install theano in order to run keras code but it can sometimes be useful to switch back and forth from tensorflow to theano when building keras models theano can also be installed from pypisudo pip install theano if you're using gputhen you should configure theano to use your gpu you can create theano configuration file with this commandnano ~theanorc thenfill in the file with the following configuration[globalfloatx float device gpu [nvccfastmath true installing keras you can install keras from pypisudo pip install keras alternativelyyou can install keras from github doing so will allow you to access the keras/examples folderwhich contains many example scripts for you to learn fromgit clone cd keras sudo python setup py install you can now try to run keras scriptsuch as this mnist examplepython examples/mnist_cnn py note that running this example to completion may take few minutesso feel free to force-quit it (ctrl-conce you've verified that it' working normally after you've run keras at least oncethe keras configuration file can be found at ~keras/keras json you can edit it to select the backend that keras runs ontensorflowtheanoor cntk your configuration file should like thislicensed to