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.

tensorflow
3 votesLP185.00
2 Answers
JW229.00
3

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
Reply
JO218.00
2

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

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