I need to find which version of TensorFlow I have installed. I\'m using Ubuntu 16.04 Long Term Support.
Another variation, i guess :P
python3 -c 'print(__import__("tensorflow").__version__)'
Almost every normal package in python assigns the variable .__version__
to the current version. So if you want to find the version of some package you can do the following
import a
a.__version__
For tensorflow it will be
import tensorflow as tf
tf.version.VERSION
For old versions of tensorflow (below 0.10), use tf.__version__
If you have TensorFlow 2.x:
sess = tf.compat.v1.Session(config=tf.compat.v1.ConfigProto(log_device_placement=True))
import tensorflow as tf
print(tf.VERSION)
Tensorflow version in Jupyter Notebook:-
!pip list | grep tensorflow
On Latest TensorFlow release 1.14.0
tf.VERSION
is deprecated, instead of this use
tf.version.VERSION
ERROR:
WARNING: Logging before flag parsing goes to stderr.
The name tf.VERSION is deprecated. Please use tf.version.VERSION instead.