What's the command to find out the version of TensorFlow on my computer? I installed TensorFlow on my computer some time ago and want to make sure that I have the latest version.
Asked
Active
Viewed 1e+01k times
28
-
4Possible duplicate of [How to find which version of TensorFlow is installed in my system?](https://stackoverflow.com/questions/38549253/how-to-find-which-version-of-tensorflow-is-installed-in-my-system) – nbro Nov 18 '17 at 11:52
7 Answers
61
import tensorflow as tf
tf.__version__

Yaroslav Bulatov
- 57,332
- 22
- 139
- 197
-
1Something you might run into doing this is an error that says "ImportError: cannot import name pywrap_tensorflow". You're likely just running Python from the Tensorflow directory. Just switch to a different directory, and it should work. – smckee Feb 24 '17 at 21:57
-
5
15
pip list | grep tensorflow
You can find the version of any installed library by replacing 'tensorflow' with the library name.

OmK
- 147
- 2
- 9
10
$ pip show tensorflow
Name: tensorflow
Version: 1.5.0
Summary: TensorFlow helps the tensors flow

Trideep Rath
- 3,623
- 1
- 25
- 14
3
$ source activate tensorflow
$ pip show tensorflow
Name: tensorflow
Version: 1.9.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0

user365
- 31
- 1
-
1Welcome to posting on Stack Overflow. Thanks for your answer. But please try to refrain from making code only (or command only) answers. [How to Answer](https://stackoverflow.com/help/how-to-answer) – Elletlar Jul 22 '18 at 20:35
3
Use the below code In jupyter-Notebook/Pycharm to check the tensorflow version.
import tensorflow as tf
print(tf.version.VERSION)

Amar Kumar
- 2,392
- 2
- 25
- 33
-
1This also works when I open python 3.8 in terminal on Ubuntu 18.04 with tensorflow version 2.4. – Mohit Pandey Dec 16 '20 at 19:57
0
You can try this:
pip freeze|grep tensorflow

CertainPerformance
- 356,069
- 52
- 309
- 320

Vikash Prasad
- 11
- 2
0
$ import tensorflow as tf
$ tf.test.is_built_with_cuda()
True
$ tf.test.is_gpu_available(cuda_only=False, min_cuda_compute_capability=None)
False

Felix Schwarz
- 2,938
- 4
- 28
- 41