我Tensorflow 0.5.0
通过git clone从源代码安装了最新的.并希望更新到Tensorflow 0.6.0
git pull ./configure bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
但目录中的Tensorflow库/usr/lib/python2.7/site-packages
仍然具有0.5.0版本
结果中的版本"pip show tensorflow"
也是0.5.0
要从源安装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