1. 使用命令:sudo pip3 install --upgrade \ https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.1.0rc2-cp35-cp35m-linux_x86_64.whl 安装。

遇到如下问题:

tensorflow-1.1.0rc2-cp35-cp35m-linux_x86_64.whl is not a supported wheel on this platform.

试过好几个版本都报相同的错误,不支持平台。

2. 换命令 pip3 install  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/itcast/.pip/pip.log

(1) 有说tensorflow不支持32位系统只支持64位系统的,特意用命令sudo uname --m查看系统是x86_64,说明是64位。

另 查到这个问题原因是: pip3的版本太低。

使用命令 pip3 -V  可查看版本:pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)

参考:https://blog.csdn.net/sisiel/article/details/77540236, https://blog.csdn.net/zhangchuang601/article/details/79387725

(2) 然后使用网上公认的升级命令: pip3 install --upgrade pip

此次升级可行,如果不行可参考   https://blog.csdn.net/zhangchuang601/article/details/79387725 :

$ sudo easy_install --upgrade pip  #运行后解决问题。
$ sudo easy_install --upgrade six   #这个不用也行

(3) 然后再执行 pip3 install  tensorflow 可以顺利往下走了,然后遇到如下问题:

Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

3. 使用 sudo pip3 install --ignore-installed six 命令安装好six

此命令借鉴于:https://blog.csdn.net/xiaoxianerqq/article/details/80579113

然后继续 pip3 install  tensorflow 终于安装完成了。

The directory '/home/itcast/.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/itcast/.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.
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting tensorflow
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/69/90/357f5f0e7da99bc314f84f01922d95f3d52b008ec3f70558886b14639820/tensorflow-1.10.1-cp34-cp34m-manylinux1_x86_64.whl (59.0MB)
100% |████████████████████████████████| 59.0MB 217kB/s
Collecting tensorboard<1.11.0,>=1.10.0 (from tensorflow)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c6/17/ecd918a004f297955c30b4fffbea100b1606c225dbf0443264012773c3ff/tensorboard-1.10.0-py3-none-any.whl (3.3MB)
100% |████████████████████████████████| 3.3MB 829kB/s
Collecting grpcio>=1.8.6 (from tensorflow)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/48/ad/44d573b2ae87a12806827329e9d22331c1e27d227c20a878499accd06ee0/grpcio-1.14.1-cp34-cp34m-manylinux1_x86_64.whl (9.3MB)
100% |████████████████████████████████| 9.3MB 1.2MB/s
Collecting absl-py>=0.1.6 (from tensorflow)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/cc/e6/6cc5c834023685dd83a28bdb5c1826d9340111493a447e9a9230269defa8/absl-py-0.4.0.tar.gz (88kB)
100% |████████████████████████████████| 92kB 1.5MB/s
Collecting wheel>=0.26 (from tensorflow)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl (41kB)
100% |████████████████████████████████| 51kB 3.4MB/s
Requirement already satisfied: setuptools<=39.1.0 in /usr/lib/python3/dist-packages (from tensorflow) (3.3)
Collecting astor>=0.6.0 (from tensorflow)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.4/dist-packages (from tensorflow) (1.1.0)
Requirement already satisfied: numpy<=1.14.5,>=1.13.3 in /usr/local/lib/python3.4/dist-packages (from tensorflow) (1.14.5)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.4/dist-packages (from tensorflow) (1.11.0)
Collecting protobuf>=3.6.0 (from tensorflow)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/61/52/463bac997cee19c74e1aa9153e4aef1af26737f90c91837c13efa0225c25/protobuf-3.6.1-cp34-cp34m-manylinux1_x86_64.whl (1.1MB)
100% |████████████████████████████████| 1.1MB 1.2MB/s
Requirement already satisfied: gast>=0.2.0 in /usr/local/lib/python3.4/dist-packages (from tensorflow) (0.2.0)
Collecting markdown>=2.6.8 (from tensorboard<1.11.0,>=1.10.0->tensorflow)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl (78kB)
100% |████████████████████████████████| 81kB 1.4MB/s
Collecting werkzeug>=0.11.10 (from tensorboard<1.11.0,>=1.10.0->tensorflow)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
100% |████████████████████████████████| 327kB 1.0MB/s
Installing collected packages: markdown, wheel, protobuf, werkzeug, tensorboard, grpcio, absl-py, astor, tensorflow
Found existing installation: wheel 0.24.0
Uninstalling wheel-0.24.0:
Successfully uninstalled wheel-0.24.0
Running setup.py install for absl-py ... done
Successfully installed absl-py-0.4.0 astor-0.7.1 grpcio-1.14.1 markdown-2.6.11 protobuf-3.6.1 tensorboard-1.10.0 tensorflow-1.10.1 werkzeug-0.14.1 wheel-0.31.1

4. 测试

$ python3
Python 3.4.3 (default, Nov 28 2017, 16:41:13)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
>>> tensorflow.constant(3)
<tf.Tensor 'Const:0' shape=() dtype=int32>
>>>

应该可以正常使用了。

python3安装tensorflow遇到的问题的更多相关文章

  1. 萤火虫系统(firefly) RK3399 python3 安装 tensorflow

    前言: 继续之前在RK3399上安装深度学习的一些环境,主要碰到的坑给大家分享一下,为了让大家少走弯路.这次是安装tensorflow,话不多说,直接开撸. --------------------- ...

  2. Centos7安装TensorFlow

    TensorFlow也火了一段时间,想想既然要研究NLP.为什么不好好应用一下Google开源的Deep Learning平台呢,一切还是先从搭建好开发环境開始. 非常多大神们也做了这方面的工作.汲取 ...

  3. windows下 python3.5+tensorflow 安装

    个人随笔,备忘参考 首先最近的tensorflow 对python3.5.x友好,我先装了Python3.6,查其他的一些博客说出现问题,后来重装3.5.0.下载用迅雷,超快. 安装比较简单,官网下载 ...

  4. Python3 离线安装TensorFlow包

    Python3 离线安装TensorFlow包 1,下载包 官网地址:https://pypi.org/project/tensorflow/1.1.0rc2/#files 清华镜像:https:// ...

  5. Win10 安装 Anaconda3 用 Anaconda3 安装TensorFlow 1.2 (只支持python3.5)

    Win10 安装 Anaconda3 1.安装Anaconda3 选择相应的Anaconda进行安装,下载地址点击这里,下载对应系统版本的Anaconda,官网现在的版本是Anaconda 4.3.1 ...

  6. Windows下安装Tensorflow(python3.6):记录过程

    安装前的情况: 之前使用的都是python2.7,但是tensorflow不支持2.x版本,那只有基于在3.x版本进行安装了 前段时间,我安装VS2017的时候安装了python3.6于是想在此基础上 ...

  7. win10 anaconda3 python3.6安装tensorflow keras tensorflow_federated详细步骤及在jupyter notebook运行指定的conda虚拟环境

    本文链接:https://blog.csdn.net/weixin_44290661/article/details/1026789071. 安装tensorflow keras tensorflow ...

  8. 在linux上cuda9.0 cudnn7.* 安装python3.6 tensorflow 1.5.1

    链接:https://www.jianshu.com/p/bcf37d0e4e9b 为了入门机器学习的小伙伴能安装好工具,特制作此教程 按照 Anaconda 下载网站上的说明下载并安装 Anacon ...

  9. TensorFlow的安装 (python3.6在有pip的条件下如何安装TensorFlow)

     1.Window,MacOS,Linux都已支持Tensorflow.  2.Window用户只能使用python3.5(64bit).MacOS,Linux支持python2.7和python ...

随机推荐

  1. 002-shell变量定义、使用、字符串、数组、注释

    一.变量定义 定义变量时,变量名不加美元符号($) name="lhx" 注意,变量名和等号之间不能有空格.同时,变量名的命名须遵循如下规则: 命名只能使用英文字母,数字和下划线, ...

  2. 子集和问题(应用--换零钱)POJ2229:Sumsets

    我一直在纠结换零钱这一类型的题目,今天好好絮叨一下,可以说他是背包的应用,也可以说他是单纯的dp.暂且称他为dp吧. 先上一道模板题目. sdut2777: 小P的故事——神奇的换零钱 题目描述 已知 ...

  3. lua全局状态机

    本文内容基于版本:Lua 5.3.0 global_State概述 global_State结构,我们可以称之为Lua全局状态机.从Lua的使用者角度来看,global_State结构是完全感知不到的 ...

  4. git安装教程(windows安装)

    git下载地址 https://git-scm.com/download/win 选择安装的组件,推荐全选 Additional icons 附加图标 ​ On the Desktop 在桌面上 Wi ...

  5. 【java】使用Builder模式,轻松应对动态繁杂的方法参数

    背景:在咱编写的图片处理模块里,针对加载这个方法,参数很多,如: /** * 加载图片,经过内存.磁盘.两层缓存如果还没找到,则走http访问网络资源 * @param url 地址 * @param ...

  6. HBase1.2.6 预分区后,数据不进入预定分区的一个 bug

    rowkey 如下: 19000015115042900001511504390000151150449000015115045900001511504690000151150479000015115 ...

  7. JS正则表达式从入门到入土(5)—— 量词

    量词 很多时候,我们需要匹配一个连续出现很多次字符的字符串,比如,我们要匹配一个连续出现20次的数字的字符串,按照之前的写法: \d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d ...

  8. C++基础---结构体(struct)

    转自:http://blog.csdn.net/cainv89/article/details/48447225 1. 结构体(struct) 1.1 结构体的概念 结构体(struct):是由一系列 ...

  9. 【c++ primer, 5e】函数重载

    [函数重载] Java中的重载一般是指重载构造器,或是子类覆写父类的方法:C++中的重载稍微复杂一些. 定义重载函数 典型的数据库应用. Record lookup(const Account& ...

  10. Django学习笔记之Queryset详解

    Django ORM用到三个类:Manager.QuerySet.Model.Manager定义表级方法(表级方法就是影响一条或多条记录的方法),我们可以以models.Manager为父类,定义自己 ...