Ubuntu 14.04 LTS 64bit 기준으로 정리.

https://www.tensorflow.org/install/install_linux


위 링크에 virtualenv를 이용하여 설치하는 내용도 정리되어 있다.

하지만, 실제 따라해 보니 아래와 같이 설치할 수 있는 패키지가 없다고 한다.

$ pip install --upgrade tensorflow

Downloading/unpacking tensorflow

  Could not find any downloads that satisfy the requirement tensorflow

Cleaning up...

No distributions at all found for tensorflow

Storing debug log for failure in /home/oooo/.pip/pip.log


~/.pip/pip.log 를 보면 현재 리눅스 머신에 설치되어 있는  python과 호환이 안된다고 모두 건너뛴다.

Downloading/unpacking tensorflow

  Getting page https://pypi.python.org/simple/tensorflow/

  URLs to search for versions for tensorflow:

  * https://pypi.python.org/simple/tensorflow/

  Analyzing links from page https://pypi.python.org/simple/tensorflow/

    Skipping https://pypi.python.org/packages/00/16/c8ba385fc6511ca362f32326cd1d6a99bbbabbc8341607ff70c290e0be7b/tensorflow-0.12.1-cp34-cp34m-manylinux1_x86_64.whl#md5=981c0a406eb9865423b11c03b489040d (from https://pypi.python.org/simple/tensorflow/) because it is not compatible with this Python

...

    Skipping https://pypi.python.org/packages/7e/7c/f398393beab1647be0a5e6974b8a34e4ea2d3cb7bd9e38bd43a657ed27d1/tensorflow-1.0.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=5c88e656fcd34cd89d4cf48d3ec7dd67 (from https://pypi.python.org/simple/tensorflow/) because it is not compatible with this Python
...

python은 Ubuntu 14.04에서 배포되는 버전이다.
$ python --version
Python 2.7.6

$ dpkg -l python2.7
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  python2.7      2.7.6-8ubunt amd64        Interactive high-level object-ori

$ python
Python 2.7.6 (default, Oct 26 2016, 20:30:19) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> print(sysconfig.get_config_vars('CONFIG_ARGS'))
["'--enable-shared' '--prefix=/usr' '--enable-ipv6' '--enable-unicode=ucs4' '--with-dbmliborder=bdb:gdbm' '--with-system-expat' '--with-system-ffi' '--with-fpectl' 'CC=x86_64-linux-gnu-gcc' 'CFLAGS=-D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'"]
>>> 
>>> import pip
>>> print(pip.pep425tags.get_supported())
[('cp27', 'cp27mu', 'manylinux1_x86_64'), ('cp27', 'cp27mu', 'linux_x86_64'), ('cp27', 'none', 'manylinux1_x86_64'), ('cp27', 'none', 'linux_x86_64'), ('py2', 'none', 'manylinux1_x86_64'), ('py2', 'none', 'linux_x86_64'), ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('py27', 'none', 'any'), ('py2', 'none', 'any'), ('py26', 'none', 'any'), ('py25', 'none', 'any'), ('py24', 'none', 'any'), ('py23', 'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none', 'any'), ('py20', 'none', 'any')]

위 정보에 따르면, 현재 기준으로 https://pypi.python.org/pypi/tensorflow
에서 tensorflow-1.2.0rc1-cp27-cp27mu-manylinux1_x86_64.whl
설치가능 해야 하는데 안됨.

구글링하여, cp27-none 으로 설치.
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.2.0rc1-cp27-none-linux_x86_64.whl
$ pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.0rc1-cp27-none-linux_x86_64.whl


+ Recent posts