如何从源更新Tensorflow

Qin*_*Liu 4 tensorflow

Tensorflow 0.5.0通过git clone从源代码安装了最新的.并希望更新到Tensorflow 0.6.0

git pull
./configure
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
Run Code Online (Sandbox Code Playgroud)

但目录中的Tensorflow库/usr/lib/python2.7/site-packages仍然具有0.5.0版本

结果中的版本"pip show tensorflow"也是0.5.0

mrr*_*rry 10

要从源安装TensorFlow库,您需要构建PIP包并进行安装.步骤如下:

$ 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
Run Code Online (Sandbox Code Playgroud)