Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Update Tensorflow from source

Tags:

tensorflow

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

but the Tensorflow library in the directory /usr/lib/python2.7/site-packages still has the version 0.5.0

the version in the result of "pip show tensorflow" also is 0.5.0

like image 618
QingsongLiu Avatar asked Dec 11 '22 19:12

QingsongLiu


1 Answers

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
like image 86
mrry Avatar answered Jun 14 '23 21:06

mrry