tensorflow 版本列表,如何找到我的系统中安装了哪个版本的TensorFlow?

I need to find which version of TensorFlow I have installed. I'm using Ubuntu 16.04 Long Term Support.

解决方案

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)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值