How to find out which version of tensorflow is installed in my pc?

I'm using tensorflow and have got some weired issues. I'm told it might be related to the version of tensorflow, but I don't know a proper way to find out the version I'm using.

3 votesLP199.00
2 Answers

You can import tensorflow and take the version from the package inside your python script, or just run one of these commands

python -c 'import tensorflow as tf; print tf.__version__'  # for Python 2
python3 -c 'import tensorflow as tf; print(tf.__version__)'  # for Python 3

If you've installed your tensorflow by pip, you can check it with this command

pip list | grep tensorflow

It will show all tensorflow packages you've installed via pip

Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?