How to find which version of TensorFlow is installed in my system?
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)
How do I find out the version of TensorFlow on my computer?
import tensorflow as tf
tf.__version__
How to check which version of Keras is installed?
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__)"
How to find the Bazel version currently in my system via command prompt code or some other ways for Tensorflow installation
Running:
bazel --version
Will tell you which version of bazel is installed (and in search PATH
) on your system.
For ensuring use of correct / consistent version of bazel across the board, it may be helpful to use bazelisk
as a front to bazel which also honors the .bazelversion
file in the current dir or its parents (if present, as it is in the tensorflow tree ; that would normally translate to, within the bazel workspace) and runs (downloads if needed) corresponding bazel.
Related Topics
How to Clear/Delete the Contents of a Tkinter Text Widget
Counting Non Zero Values in Each Column of a Dataframe in Python
How to Count the Total Number of Words in a Pandas Dataframe Cell and Add Those to a New Column
Converting a List into Comma Separated and Add Quotes in Python
Can Anyone Explain Me What This Python 3 Command Do
Python Json.Loads Valueerror, Expecting Delimiter
In Python, How to Split a String and Keep the Separators
Add Numpy Array as Column to Pandas Data Frame
How to Plot Predicted Values VS the True Value
Comparing Two Json Objects Irrespective of the Sequence of Elements in Them
Pip Error: Microsoft Visual C++ 14.0 Is Required
How to Kill a While Loop With a Keystroke
Remove Partial String from Dataframe With Pandas
How to Select the Last Column of Dataframe
How to Install Python Packages from the Tar.Gz File Without Using Pip Install
Pyspark: How to Duplicate a Row N Time in Dataframe
How Does \R (Carriage Return) Work in Python
Save Variables in Every Iteration of for Loop and Load Them Later