How to check which version of Keras is installed?

Aerin picture Aerin · Sep 7, 2017 · Viewed 162.6k times · Source

Question is the same as the title says.

I prefer not to open Python and I use either MacOS or Ubuntu.

Answer

Aerin picture Aerin · Sep 7, 2017

Python library authors put the version number in <module>.__version__. You can print it by running this on the command line:

python -c 'import keras; print(keras.__version__)'

If it's Windows terminal, enclose snippet with double-quotes like below

python -c "import keras; print(keras.__version__)"