如何从源代码更新 Tensorflow [英] How to Update Tensorflow from source
本文介绍了如何从源代码更新 Tensorflow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过 git clone 从源代码安装了最新的 Tensorflow 0.5.0
.并且想要更新到 Tensorflow 0.6.0
I installed the latest Tensorflow 0.5.0
from source via git clone.
and want to update to Tensorflow 0.6.0
git pull
./configure
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
但是/usr/lib/python2.7/site-packages
目录下的Tensorflow库还是0.5.0版本
but the Tensorflow library in the directory /usr/lib/python2.7/site-packages
still has the version 0.5.0
"pip show tensorflow"
结果中的版本也是0.5.0
推荐答案
要从源代码安装 TensorFlow 库,您需要 构建一个 PIP 包并安装它.步骤如下:
To install the TensorFlow library from source, you need to build a PIP package and install it. The steps are as follows:
$ git pull
$ ./configure
$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
# ...or, with GPU support
$ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
# The name of the .whl file will depend on your platform.
$ pip install /tmp/tensorflow_pkg/tensorflow-0.6.0-cp27-none-linux_x86_64.whl
这篇关于如何从源代码更新 Tensorflow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文