在Python交互式窗口导入tensorflow出现了下面的错误:

Copy

root@ubuntu:~# python3 Python 3.6.8 (default, Oct 7 2019, 12:59:55) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow as tf; /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) /usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /usr/local/lib/python3.6/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)])

我的错误原因是numpy的版本较高造成的,换成1.14.0版本后解决了

出错时的Numpy版本

Copy

root@ubuntu:~# pip3 show numpy Name: numpy Version: 1.17.3 Summary: NumPy is the fundamental package for array computing with Python. Home-page: https://www.numpy.org Author: Travis E. Oliphant et al. Author-email: None License: BSD Location: /usr/local/lib/python3.6/dist-packages Requires:

安装1.14.0的Numpy版本

Copy

root@ubuntu:~# pip3 install numpy==1.14.0 Collecting numpy==1.14.0 Downloading https://files.pythonhosted.org/packages/dc/ac/5c270dffb864f23315e9c1f9e0a0b300c797b3c170666c031c4de42aacae/numpy-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (17.2MB) 100% |████████████████████████████████| 17.2MB 75kB/s Installing collected packages: numpy Successfully installed numpy-1.14.0 root@ubuntu:~# python3 Python 3.6.8 (default, Oct 7 2019, 12:59:55) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow as tf; >>> tf.__version__ '1.14.0' >>>

tensorflow与numpy的版本兼容性问题(亲测)相关推荐

  1. tensorflow和python不兼容_tensorflow与numpy的版本兼容性问题的解决

    tensorflow与numpy的版本兼容性问题的解决,版本,站长站,错误,文章,较高 tensorflow与numpy的版本兼容性问题的解决 易采站长站,站长之家为您整理了tensorflow与nu ...

  2. MATLAB下载libsvm,以及对应MinGW-w64版本下载(亲测有效)

    MATLAB下载libsvm,以及对应MinGW-w64版本下载(亲测有效) 最近在学习SVM,在matlab上安装和使用Libsvm的过程中遇到了好多问题,在网上查看了许多资料,踩了许多坑. 整理一 ...

  3. iNode Mac版本下载(亲测兼容M1 Pro)

    首先感谢这篇博客提供的解决方法: https://blog.csdn.net/marker_NEW_BIE/article/details/120435796?spm=1001.2014.3001.5 ...

  4. douphp mysql版本_【公众号+小程序】DouPHP模块化企业网站管理系统版本号v1.6 – 最新版本 无后门 亲测...

    源码亲测可用 源码亲测可用 源码亲测可用 源码简介 更新日志 将背景更改为响应式布局,支持手机的后台管理:前景也更改为响应式布局,并且默认情况下关闭了独立移动版本(可以在系统设置中打开) douphp ...

  5. JAVA-Word转PDF各种版本实现方式--亲测有效。。。持续更新中

    当下做一个项目,就是各种操作office,客户的需求总是各种不按常理,来需求就得搞啊.对JAVA操作office这方面真是头大,弟弟是真滴不懂不会啊.无奈只好试啊试的.网上一大堆好使的,一大堆不好使的 ...

  6. 2022最新视频打赏系统全开源版本+附教程/亲测可用

    正文: 最新视频打赏系统全开源+附教程/亲测,这套系统是我从别人那里拿到的,100%完整可用,今天测试防红失效了,需要修改防红API即可,程序仅供研究学习使用. 程序的全部演示图放到压缩包了,有兴趣的 ...

  7. 真实机下 ubuntu 18.04 安装anaconda+cuDNN+pytorch以及其版本选择(亲测非常实用)

    推荐这个博客:有版本对应关系查询: https://blog.csdn.net/qq_18483627/article/details/105885483?utm_medium=distribute. ...

  8. 真实机下 ubuntu 18.04 安装GPU +CUDA+cuDNN 以及其版本选择(亲测非常实用)【转】...

    本文转载自:https://blog.csdn.net/u010801439/article/details/80483036 ubuntu 18.04 安装GPU +CUDA+cuDNN : 目前, ...

  9. numpy的科学计算(亲测)

    代码: from django.test import TestCase import numpy as np # Create your tests here.def nuTest():#特定范围内 ...

最新文章

  1. 如何从ATS获取客户端平均响应时间(单位,毫秒)?
  2. C#中几种换行符,不同操作系统各不相同【转】
  3. ML之LiR:机器学习经典算法之线性回归算法LiR的简介、使用方法、经典案例之详细攻略
  4. 计算机学业水平测试题及答案初中,初中信息技术学业水平考试试题30号试题.doc...
  5. lintcode-514-栅栏染色
  6. 【智能车Code review】——小S与中S道路判断
  7. OAuth2.0 原理流程及其单点登录和权限控制
  8. java线程 属性_Java 线程基础
  9. VUE项目启动:You may use special comments to disable some warnings
  10. python函数参数列表_python函数列表
  11. 视频编解码(九):FFMPEG操作总结一
  12. 华为OJ 初级:等差数列
  13. 电脑接收,怎么在电脑上发传真 在电脑上接收传真方法介绍【详细步骤】
  14. 阿里在线字体库超级简单又快捷的使用方法+Dcloud插件使用图标
  15. Web在线报表设计器使用指南
  16. MySQL复制 slave_exec_mode 参数IDEMPOTENT 说明
  17. gentoo的USE参数详细说明
  18. 【SEMrush教程】SEO关键词魔法工具使用技巧
  19. ORACLE 的触发器类型有哪些,ORACLE触发器类型
  20. ESX/ESXi服务器安装驱动

热门文章

  1. c++STL容器的Deque
  2. 经典C语言程序100例之七六
  3. mysql支持arm64架构吗_arm64(aarch64)下使用mysql
  4. matlab求解复数方程组,【求解】matlab求解非齐次方程组,但是系数矩阵是复数,求帮忙...
  5. 「C++」C++ Primer Plus 笔记:第一章 预备知识
  6. hbase数据库介绍,HBASE的特点,表结构逻辑视图,Row Key,列族,时间戳,Cell
  7. Java中读取属性文件以及做资源国际化
  8. SQL基础操作_2_操作多个表
  9. 装完黑苹果怎么装windows_BlackArch(黑Arch)、怎么装?
  10. py-rfcn算法caffe配置,训练及应用到自己的数据集