TensorFlow 버전 업데이트 (Version Update)


현재 버전 확인

virtualenv 사용자는 활성화 시킴

source ./tensorflow/bin/activate

Tensor flow version 확인

(tensorflow)root@jemin-virtual-machine:~/tensorflow# pip show tensorflow
---
Name: tensorflow
Version: 0.5.0
Location: /root/tensorflow/lib/python2.7/site-packages
Requires: numpy, six

필자의 경우 설치를 예전에해서 r0.5버전이다.

업데이트 (r0.5 -> r0.9)

당연히 python에서 pacakge를 쉽게 설치하게 도와주는 pip유틸이 설치되어 있어야 한다.

# Ubuntu/Linux 64-bit
$ sudo apt-get install python-pip python-dev python-virtualenv

그 다음 Ubuntu 6bit이며 Python 2.7버전을 쓰는 사람은 아래의 r0.9 tensorflow를 다운 받자.
2016.6.15일 기준으로 필자는 r0.5에서 r0.9로 업데이트 했다.

# Ubuntu/Linux 64-bit, CPU only, Python 2.7
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0rc0-cp27-none-linux_x86_64.whl

# Python 2
(tensorflow)$ sudo pip install --upgrade $TF_BINARY_URL

실행하면 아래와 같이 설치가 된다.

    changing mode of /root/tensorflow/bin/f2py to 755
  Found existing installation: wheel 0.24.0
    Not uninstalling wheel at /usr/lib/python2.7/dist-packages, outside environment /root/tensorflow
  Found existing installation: setuptools 2.2
    Uninstalling setuptools:
      Successfully uninstalled setuptools
Successfully installed tensorflow numpy protobuf wheel setuptools
Cleaning up...

버전을 확인하면 r0.9로 변경된것을 알 수 있다.

(tensorflow)root@jemin-virtual-machine:~/tensorflow# pip show tensorflow
---
Name: tensorflow
Version: 0.9.0rc0
Location: /root/tensorflow/lib/python2.7/site-packages
Requires: numpy, protobuf, wheel, six

업데이트 (r0.9 -> r0.12)

Update 전

(tensorflow)root@jemin-virtual-machine:~# pip show tensorflow
---
Name: tensorflow
Version: 0.9.0rc0
Location: /root/tensorflow/lib/python2.7/site-packages
Requires: numpy, protobuf, wheel, six

자신에게 맞는 최신 TensorFlow 링크를 추가한다.

# Ubuntu/Linux 64-bit, CPU only, Python 2.7
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc0-cp27-none-linux_x86_64.whl

# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.0rc0-cp27-none-linux_x86_64.whl

# Mac OS X, CPU only, Python 2.7:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0rc0-py2-none-any.whl

# Mac OS X, GPU enabled, Python 2.7:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-0.12.0rc0-py2-none-any.whl

# Ubuntu/Linux 64-bit, CPU only, Python 3.4
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc0-cp34-cp34m-linux_x86_64.whl

# Ubuntu/Linux 64-bit, GPU enabled, Python 3.4
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.0rc0-cp34-cp34m-linux_x86_64.whl

# Ubuntu/Linux 64-bit, CPU only, Python 3.5
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc0-cp35-cp35m-linux_x86_64.whl

# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Installing from sources" below.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.0rc0-cp35-cp35m-linux_x86_64.whl

# Mac OS X, CPU only, Python 3.4 or 3.5:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0rc0-py3-none-any.whl

# Mac OS X, GPU enabled, Python 3.4 or 3.5:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow_gpu-0.12.0rc0-py3-none-any.whl

업그레이드

필자는 Ubuntu 64bit, python 2.7, CPU 버전을 쓰므로 아래 링크를 추가 했다.

# Ubuntu/Linux 64-bit, CPU only, Python 2.7
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc0-cp27-none-linux_x86_64.whl

pip install --upgrade $TF_BINARY_URL

성공 메시지

Successfully installed tensorflow protobuf mock numpy setuptools funcsigs pbr
Cleaning up..

버전업데이트 확인
무슨 문제인건지 pip show로 이전처럼 버전 확인이 잘 안된다. 계속 예전버전으로 표시된다.
직접 파이썬에서 Tensorflow를 실행해서 확인하자.

(tensorflow)root@jemin-virtual-machine:~# python -c 'import tensorflow as tf; print(tf.__version__)'

0.12.0-rc0


+ Recent posts