Question is the same as the title says.
I prefer not to open Python and I use either MacOS or Ubuntu.
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__)"
Simple command to check keras version:
(py36) C:\WINDOWS\system32>python
Python 3.6.8 |Anaconda custom (64-bit)
>>> import keras
Using TensorFlow backend.
>>> keras.__version__
'2.2.4'
pip show tensorflow
C:\>pip show tensorflow
Name: tensorflow
Version: 2.4.1
Summary: TensorFlow is an open source machine learning framework for
everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Requires: google-pasta, wheel, absl-py, flatbuffers, numpy, astunparse, opt-
einsum, six, termcolor, typing-extensions, wrapt, grpcio, tensorboard,
protobuf, tensorflow-estimator, gast, h5py, keras-preprocessing
Required-by:
Same way can try for
pip show keras
If it is installed then it will provide the details.
For terminal, run: (Change with python3
for version of Python3)
python -c 'import keras; print(keras.__version__)'
Or if you want to check inside code, include:
import keras
print(keras.__version__)