Config Router

  • Google Sheets
  • CCNA Online training
    • CCNA
  • CISCO Lab Guides
    • CCNA Security Lab Manual With Solutions
    • CCNP Route Lab Manual with Solutions
    • CCNP Switch Lab Manual with Solutions
  • Juniper
  • Linux
  • DevOps Tutorials
  • Python Array
You are here: Home / How to find which version of TensorFlow is installed in my system?

How to find which version of TensorFlow is installed in my system?

August 20, 2021 by James Palmer

This depends on how you installed TensorFlow. I am going to use the same headings used by TensorFlow’s installation instructions to structure this answer.

Pip installation
Run:
python -c ‘import tensorflow as tf; print(tf.__version__)’ # for Python 2
python3 -c ‘import tensorflow as tf; print(tf.__version__)’ # for Python 3

Note that python is symlinked to /usr/bin/python3 in some Linux distributions, so use python instead of python3 in these cases.
pip list | grep tensorflow for Python 2 or pip3 list | grep tensorflow for Python 3 will also show the version of Tensorflow installed.

Virtualenv installation
Run:
python -c ‘import tensorflow as tf; print(tf.__version__)’ # for both Python 2 and Python 3

pip list | grep tensorflow will also show the version of Tensorflow installed.
For example, I have installed TensorFlow 0.9.0 in a virtualenv for Python 3. So, I get:
$ python -c ‘import tensorflow as tf; print(tf.__version__)’
0.9.0

$ pip list | grep tensorflow
tensorflow (0.9.0)

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__

Related

Filed Under: Uncategorized

Recent Posts

  • How do I give user access to Jenkins?
  • What is docker volume command?
  • What is the date format in Unix?
  • What is the difference between ARG and ENV Docker?
  • What is rsync command Linux?
  • How to Add Music to Snapchat 2021 Android? | How to Search, Add, Share Songs on Snapchat Story?
  • How to Enable Snapchat Notifications for Android & iPhone? | Steps to Turn on Snapchat Bitmoji Notification
  • Easy Methods to Fix Snapchat Camera Not Working Black Screen Issue | Reasons & Troubleshooting Tips to Solve Snapchat Camera Problems
  • Detailed Procedure for How to Update Snapchat on iOS 14 for Free
  • What is Snapchat Spotlight Feature? How to Make a Spotlight on Snapchat?
  • Snapchat Hack Tutorial 2021: Can I hack a Snapchat Account without them knowing?

Copyright © 2025 · News Pro Theme on Genesis Framework · WordPress · Log in