How to update tensor flow from source

I installed the last Tensorflow 0.5.0from the source using git clone. and want to upgrade toTensorflow 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-packagesstill has version 0.5.0

"pip show tensorflow"there is also a version as a result0.5.0

+4
source share
5 answers

To install the TensorFlow library from the source, you need to create a PIP package and install it . These 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
+10
source

git pull does not work for me, as some local files are modified by the last line, so with a little modification I update like this:

git fetch --all
git reset --hard origin/master
./configure
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
sudo pip install /tmp/tensorflow_pkg/tensorflow-0.8.0-py2-none-any.whl

. tensorflow , Mac, - Linux.

+1

:

python -c "import tensorflow; print(tensorflow.__version__);"

, pp:

sudo pip uninstall tensorflow

:

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
sudo pip install $TF_BINARY_URL
+1

shadoworflow, pip

pip install --upgrade pip

TensorFlow < 0.7.1, TensorFlow protobuf,

pip uninstall

, , protobuf.

TensorFlow .

pip install, https://storage.googleapis.com/tensorflow, linux/cpu/tensorflow, .

sudo.

$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-py2-none-any.whl

$ sudo pip install --upgrade $TF_BINARY_URL

.

If you receive an error message unsupported wheel on this platform . Perhaps you are updating shadoworflow for python3. You will need pip3 for this. Try installing pip3

sudo apt-get -y install python3-pip

Then set the download path if you have not set the path yet

$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.1.0rc0-cp35-cp35m-linux_x86_64.whl

$ pip3 install --ignore-installed --upgrade $TF_BINARY_URL
+1
source

update tasorflow installation with sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl. I find this in the next issue, comment by mohamed-ali. https://github.com/tensorflow/tensorflow/issues/1105

0
source

Source: https://habr.com/ru/post/1619619/


All Articles