zoukankan      html  css  js  c++  java
  • ubuntu install tensorflow

    To run a command as administrator (user "root"), use "sudo <command>".
    See "man sudo_root" for details.

    csf@ubuntu:~$ ls
    Desktop    Downloads         Music     Public     Videos
    Documents  examples.desktop  Pictures  Templates
    csf@ubuntu:~$ cd Downloads
    csf@ubuntu:~/Downloads$ ls
    pip-8.1.1(1).tar.gz  pip-8.1.1.tar.gz
    csf@ubuntu:~/Downloads$ tar zxvf pip-8.1.1.tar.gz
    ......
    csf@ubuntu:~/Downloads$ cd pip-8.1.1
    csf@ubuntu:~/Downloads/pip-8.1.1$ ls
    AUTHORS.txt  docs         MANIFEST.in  pip.egg-info  README.rst  setup.py
    CHANGES.txt  LICENSE.txt  pip          PKG-INFO      setup.cfg
    csf@ubuntu:~/Downloads/pip-8.1.1$ python setup.py install
    Traceback (most recent call last):
      File "setup.py", line 6, in <module>
        from setuptools import setup, find_packages
    ImportError: No module named setuptools
    csf@ubuntu:~/Downloads/pip-8.1.1$ sudo python setup.py install
    [sudo] password for csf:
    Traceback (most recent call last):
      File "setup.py", line 6, in <module>
        from setuptools import setup, find_packages
    ImportError: No module named setuptools
    csf@ubuntu:~/Downloads/pip-8.1.1$ ls
    AUTHORS.txt  docs         MANIFEST.in  pip.egg-info  README.rst  setup.py
    CHANGES.txt  LICENSE.txt  pip          PKG-INFO      setup.cfg
    csf@ubuntu:~/Downloads/pip-8.1.1$ cd ..
    csf@ubuntu:~/Downloads$ ls
    pip-8.1.1  pip-8.1.1(1).tar.gz  pip-8.1.1.tar.gz  setuptools-20.10.1.zip
    csf@ubuntu:~/Downloads$ tar zxvf setuptools-20.10.1.zip
    gzip: stdin has more than one entry--rest ignored
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    csf@ubuntu:~/Downloads$ tar zxvf setuptools-20.10.1.zip
    gzip: stdin has more than one entry--rest ignored
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    csf@ubuntu:~/Downloads$ ls
    pip-8.1.1            pip-8.1.1.tar.gz           setuptools-20.10.1.zip
    pip-8.1.1(1).tar.gz  setuptools-20.10.1.tar.gz
    csf@ubuntu:~/Downloads$ tar zxvf setuptools-20.10.1.tar.gz
    ......
    csf@ubuntu:~/Downloads$ ls
    pip-8.1.1            pip-8.1.1.tar.gz    setuptools-20.10.1.tar.gz
    pip-8.1.1(1).tar.gz  setuptools-20.10.1  setuptools-20.10.1.zip
    csf@ubuntu:~/Downloads$ cd setuptools-20.10.1
    csf@ubuntu:~/Downloads/setuptools-20.10.1$ ls
    bootstrap.py     launcher.c               pkg_resources  setuptools
    conftest.py      MANIFEST.in              pytest.ini     setuptools.egg-info
    docs             msvc-build-launcher.cmd  README.rst     tests
    easy_install.py  pavement.py              setup.cfg
    ez_setup.py      PKG-INFO                 setup.py
    csf@ubuntu:~/Downloads/setuptools-20.10.1$ sudo python setup.py install
    .....
    csf@ubuntu:~/Downloads/setuptools-20.10.1$ cd ..
    csf@ubuntu:~/Downloads$ ls
    pip-8.1.1            pip-8.1.1.tar.gz    setuptools-20.10.1.tar.gz
    pip-8.1.1(1).tar.gz  setuptools-20.10.1  setuptools-20.10.1.zip
    csf@ubuntu:~/Downloads$ cd pip-8.1.1
    csf@ubuntu:~/Downloads/pip-8.1.1$ sudo python setup.py install

    .......
    csf@ubuntu:~/Downloads/pip-8.1.1$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
    The directory '/home/csf/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/home/csf/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Collecting tensorflow==0.8.0 from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
      Downloading https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl (22.2MB)
        100% |████████████████████████████████| 22.2MB 2.2kB/s
    Collecting six>=1.10.0 (from tensorflow==0.8.0)
      Downloading six-1.10.0-py2.py3-none-any.whl
    Collecting protobuf==3.0.0b2 (from tensorflow==0.8.0)
      Downloading protobuf-3.0.0b2-py2.py3-none-any.whl (326kB)
        100% |████████████████████████████████| 327kB 252kB/s
    Collecting wheel (from tensorflow==0.8.0)
      Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
        100% |████████████████████████████████| 71kB 325kB/s
    Collecting numpy>=1.8.2 (from tensorflow==0.8.0)
      Downloading numpy-1.11.0-cp27-cp27mu-manylinux1_x86_64.whl (15.3MB)
        100% |████████████████████████████████| 15.3MB 31kB/s
    Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages/setuptools-20.10.1-py2.7.egg (from protobuf==3.0.0b2->tensorflow==0.8.0)
    Installing collected packages: six, protobuf, wheel, numpy, tensorflow
    Successfully installed numpy-1.11.0 protobuf-3.0.0b2 six-1.10.0 tensorflow-0.8.0 wheel-0.29.0
    csf@ubuntu:~/Downloads/pip-8.1.1$ python
    Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
    [GCC 5.3.1 20160413] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import tensorflow
    >>>

  • 相关阅读:
    JDK1.0-缓冲流
    笔试错误1
    JVM 垃圾收集(转)
    Trie树和后缀树(转,简化)
    海量数据处理(转,简化)
    Struts2 内核之我见(转) -(主要是拦截器链和过滤链介绍和源码及其设计模式)
    phpize增加php模块
    Ubuntu下SVN安装和配置
    Linux下SVN配置hook经验总结
    Kruakal 算法——练习总结
  • 原文地址:https://www.cnblogs.com/cdsj/p/5452435.html
Copyright © 2011-2022 走看看