python3安装tensorflow遇到的问题

2023-05-16

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>
>>>

 应该可以正常使用了。

转载于:https://www.cnblogs.com/UFO-blogs/p/9542757.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

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

随机推荐

  • 【网络协议】openR调研

    OpenR 是 Facebook 内部设计和开发的路由协议 平台 最初于 2016 年发布 xff0c 作为所有运行于 Terragraph 上的硬件的软件基础 xff0c 提供了一个测试更快 更有效的新型路由程序的框架 xff0c 引导数
  • Linux下安装docker详细操作步骤

    Docker的几个核心概念 xff1a Docker主机 xff08 host xff09 安装了docker程序的机器Docker客户端 xff08 client xff09 连接docker主机进行操作Docker仓库 xff08 Re
  • 相对熵 KL散度 (KullbackLeibler divergence)

    这个属于香农信息论中的东西 xff0c 在 PRML 书中1 6 信息论小节中有具体说明 真正碰到应用还是在洛桑联邦理工的POM文章中 xff08 概率占用图 xff09 作者使用自己产生的估计Q来去逼近未知分布P xff0c 其中P是一个
  • Python虚拟环境——virtualenv

    林野哥推荐的虚拟环境 xff0c 这个跟Conda虚拟环境有点像 xff0c 但是和conda最大的区别就是virtualenv会创建一个单独的文件夹存放python环境 xff0c 感觉隔离程度更高 使用方法如下 xff1a 1 安装vi
  • 洛桑联邦理工 TPAMI-2008 MTMC 概率占用图POM建模过程推导 笔记

    一切都要从2019年9月的那个秋天讲起 xff0c 林野哥向我推荐了这篇洛桑联邦理工的2008年TPAMI论文 xff0c 于是一个半月的时间都花在了这上面 Multi Camera People Tracking with a Proba
  • 知识图谱笔记(小象学院课程)

    2018年寒假看小象学院课程的时候写的笔记 xff0c 一共写了10页 xff0c 记得比较乱 因为纸质笔记不容易保存 xff0c 所以把它扫成了PDF以备后用 希望大家能够指出不足和错误
  • 隐马尔可夫模型HHM重要公式推导

    我终于把HMM看完了 xff0c 这些笔记都是看的过程中自己对推导过程写的注释 xff0c 还有知识框架 原来卡尔曼和粒子滤波都是属于HMM模型里面的 笔记结构如下 xff1a 1 HMM简介 xff1a 知识体系 43 一个模型 43 两
  • MOT指标笔记《CLEAR Metrics-MOTA&MOTP》2008年·卡尔斯鲁厄大学

    搞了这么久的MOT xff0c 到头来发现最基本的MOTA和MOTP还没有搞懂 xff0c 实在有点说不过去 今天花了一上午的时间阅读2008年卡尔斯鲁厄大学的 Evaluating Multiple Object Tracking Per
  • 概率图模型-知识结构

    两周多 xff0c 终于把概率图模型这一章看完了 xff0c 由于只是看了知识框架 xff0c 很多具体细节都还不理解 内容真的是好多啊 xff0c 而且都是理论 xff0c 没有实践 希望日后用到的时候能回忆的起来这些内容吧
  • 软件工程概论-课后作业1

    需要网站系统开发需要掌握的技术 1 网页设计 xff1a Photoshop Flash max Dreamweaver 2 网站程序 xff1a Dreamweaver Visual Studio NET 会asp asp net php
  • 《强化学习》——CH2 多臂赌博机 笔记

  • 相机几何学——投影矩阵P的构成(实验报告版)

    最近在可视化WildTrack数据集 xff0c 由于要对棋盘格点进行映射和绘制 xff0c 涉及到了P矩阵的计算 现在对P的来源进行了系统的整理 xff0c 以备后忘 在最后对场地端点映射产生的问题进行了讨论 xff08 事情开始变得有意
  • 约束优化方法_2_——Frank-Wolfe方法

    Frank Wolfe方法属于约束优化中可行方向法的一种 上一篇博文对同类型的Zoutendijk可行性方法进行了介绍 xff0c 这一部分着重关注Frank Wolfe方法 Frank Wolfe方法的基本思想是 xff1a 每次迭代中使
  • 二次规划_1_——Lagrange方法

    二次规化是非线性规化中的一种特殊情形 xff0c 其目标函数是二次实函数 xff0c 约束是线性的 考试中会考到四种方法 xff0c 分别为 xff1a Lagrange方法 起作用集方法 直接消去法和广义消去法 前两种在教材上有详细描述
  • 二次规划_2_——起作用集方法

    这个算法很反人类 xff0c 迭代过程相当复杂 xff0c 最优化老师说 xff1a 明确地告诉你要考的 起作用集方法适用于消元法和Lagrange方法无法处理的不等式约束二次规化问题 其主要思想是 xff1a 以已知点为可行点 xff0c
  • 约束非线性优化:几何意义&对偶形式

    借助老师的PPT对约束非线性优化问题的几何意义 和对偶形式 进行阐述 一 几何意义 xff08 1 xff09 等式约束 考虑只有等式约束h x 的非线性优化问题 xff0c 形式为 xff1a 可视化结果如下图所示 xff0c 红色曲线为
  • 转载篇:优秀博文汇总

    1 Pytorch中堆网络语法 xff1a nn moduleList 和Sequential由来 用法和实例 写网络模型 https blog csdn net e01528 article details 84397174 2 CNN中
  • 批量归一化:Batch Normalization层 原理+Pytorch实现

    一 BN层概念明晰 BN层存在的意义 xff1a 让较深的神经网络的训练变得更加容易 BN层的工作内容 xff1a 利用小批量数据样本的均值和标准差 xff0c 不断调整神经网络中间输出 xff0c 使整个神经网络在各层的中间输出的数值更加
  • 模型量化——基础知识 & LSQ论文阅读

    感谢陈老师给的机会 xff0c 有幸能够参加2020年的DAC比赛 我在其中负责目标检测器的调试和量化 自己第一次接触量化这个任务 xff0c 很多东西都是一点一点学 一 量化基础 对于一个全精度的值 v v v xff0c 若量化步长为
  • python3安装tensorflow遇到的问题

    1 使用命令 xff1a sudo pip3 install upgrade https storage googleapis com tensorflow linux cpu tensorflow 1 1 0rc2 cp35 cp35m