Mac安装Tensorflow,运行项目报错: module compiled against API version 0xa but this version of numpy is 0x9
来源:互联网 发布:仓库数据表格 编辑:程序博客网 时间:2024/05/21 14:04
1、安装Tensorflow
$ sudo easy_install pip
$ sudo easy_install --upgrade six
$ sudo pip install tensorflow
当前最新的tensorflow版本1.2.1
2、创建第一个Tensorflow项目 Hello World
运行报错:module compiled against API version 0xa but this version of numpy is 0x9
产生错误的原因是numpy版本过旧导致的。
numpy是python用来进行矩阵运算的计算包,Mac系统自带的Python是2.7版本,包含了0.8版本的numpy,导致引入Tensorflow的时候报错。
使用pip命令安装的numpy是存放在sie-package下边,而自带的numpy在extra目录下面。系统自带的Python会调用extra目录下的numpy。
有以下几种方案来解决
1、更改参数路径,让Python调用sie-package下边的numpy
2、删掉系统自带的numpy
不用改环境变量,Python会引用sie-package下边的numby
3、升级系统自带的numpy
阅读全文
0 0
- Mac安装Tensorflow,运行项目报错: module compiled against API version 0xa but this version of numpy is 0x9
- RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
- tensorflow RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9问题
- RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
- RuntimeError: module compiled against API version 0xa but this version of numpy is 0xb
- RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
- RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
- module compiled against API version 9 but this version of numpy is 6
- MXnet: RuntimeError: module compiled against API version a but this version of numpy is 9
- module compiled against API version 9 but this version of numpy is 7的解决方法
- incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.
- mac上安装eclipse出现Version 1.6.0_65 of the JVM is not suitable for this produc
- mysql2 rails Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client
- mac eclipse Version 1.6.0_65 of the JVM is not suitable for this product
- 启动eclipse报Version 1.6.0_65 of the JVM is not suitable for this product.
- cudnn报错Loaded runtime CuDNN library: 5005 (compatibility version 5000) but source was compiled with
- 导入一个例子,报XXX.jar is cross-compiled with an incompatible version of Scala (2.10).
- AndroidStudio运行项目出现This version of Android Studio is incompatible with the Gradle Plugin used.
- Java字符串常用方法
- SSL2673 2017年8月9日提高组T1 水题
- 关于byte的溢出问题
- 二叉树的先中后序遍历,递归遍历,非递归遍历
- matlab多维数组操作
- Mac安装Tensorflow,运行项目报错: module compiled against API version 0xa but this version of numpy is 0x9
- Android Code Generator
- Java 里面split用法小结
- 笔记——01背包
- 新旧animator编辑问题
- 正则表达式使用规则
- js系列教程10-canvas绘图全解
- Orclae数据库
- hibernate 结合MySQL使用