Ubuntu16.04下keras安装

Installation

Before installing Keras, please install one of its backend engines: TensorFlow, Theano, or CNTK. We recommend the TensorFlow backend.

You may also consider installing the following optional dependencies:

  • cuDNN (recommended if you plan on running Keras on GPU). (已安装)
  • HDF5 and h5py (required if you plan on saving Keras models to disk). (sudo pip install h5py)
  • graphviz and pydot (used by visualization utilities to plot model graphs). (sudo apt install python-pydot python-pydot-ng graphviz )

Then, you can install Keras itself. There are two ways to install Keras:

  • Install Keras from PyPI (recommended):
sudo pip install keras

If you are using a virtualenv, you may want to avoid using sudo: (在创建的tensorflow虚拟环境下安装)

pip install keras