It depends on how you installed TensorFlow. I am going to use the same headers as the TensorFlow installation instructions to structure this answer.
Gun installation
Run:
python -c 'import tensorflow as tf; print(tf.__version__)'
Note that python symbolically attached to /usr/bin/python3 on some Linux distributions, so use python instead of python3 in these cases.
pip list | grep tensorflow pip list | grep tensorflow for Python 2 or pip3 list | grep tensorflow pip3 list | grep tensorflow for Python 3 will also show a version of Tensorflow.
Install Virtualenv
Run:
python -c 'import tensorflow as tf; print(tf.__version__)'
pip list | grep tensorflow pip list | grep tensorflow will also show a version of Tensorflow.
For example, I installed TensorFlow 0.9.0 in 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)
edwinksl Jul 24 '16 at 6:25 2016-07-24 06:25
source share