两个python,一个是本机自带的,一个是anaconda。先前呢,用自带的安装了Opencv,由于自带的python,对应的numpy版本是13,

而anaconda对应的版本是12,导致import 报错:

>>> import cv2
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: numpy.core.multiarray failed to import
>>> import numpy
>>> exit()

然后,升级一下numpy就可以了。

pip install numpy --upgrade

这些都是些小碎片。整理一下给大家。帮助大家节约环境搭建的时间。

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa的更多相关文章

  1. RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9

    之前测试安装好Theano之后就去安装Tensorflow,然后再回来执行Theano的测试语句的时候,就出现以下错误了: google了一下,尝试了一下解决方法 import numpy print ...

  2. Module compiled with Swift 3.0 cannot be imported in Swift 3.0.1

    Cartfile:github "SwiftyJSON/SwiftyJSON"got error:Module compiled with Swift 3.0 cannot be ...

  3. 安装tesserocr的步骤和报错RuntimeError: Failed to init API, possibly an invalid tessdata path解决办法

    1,首先下载合适的tesseract-ocr的版本 2,然后安装到这一步注意要勾选这一项来安装OCR识别支持的语言包,这样OCR就可以识别多国语言,然后就可以一直点击下一步完成安装. 3,安装tess ...

  4. 【解决了一个小问题】golang中引用一个路径较长的库,导致goland中出现"module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2"

    在项目中的go.mod文件中有这样一句: require ( github.com/xxx-devops/xx1/sdk/go v2.2.3 ) 项目的编译没有问题,但是goland中出现如下提示: ...

  5. How to check Open vSwitch version and supports OpenFlow version

    Open vSwitch (OVS) is an open-source virtual switch, featuring programmable switch forwarding capabi ...

  6. RPCVersionCapError: Requested message version, 4.17 is incompatible. It needs to be equal in major version and less than or equal in minor version as the specified version cap 4.11.

    [问题描述] RPCVersionCapError: Requested message version, 4.17 is incompatible. It needs to be equal in ...

  7. 解决The SDK platform-tools version ((23)) is too old to check APIs compiled with API 23

    用2.0的Android Studio  bate版 打开项目,在包名的地方会出现一条红线,但是似乎不影响代码的正确性. 看着好不爽啊,我倒是还没运行就找办法解决掉了.就是说是否影响程序正常运行我是不 ...

  8. The SDK platform-tools version ((23)) is too old to check APIs compiled with API 26;

    好像是更新过啥SDK之后,项目一直在包名的那一行显示红线,不过是不报编译错误的,就是看着老扎心老扎心的,开始以为是指定的SDK版本的问题,修改后发现无效,最后找到方法解决: 打开SDK Manager ...

  9. 1.新建项目出现包名有一道红线The SDK platform-tools version ((23)) is too old to check APIs compiled with API 20

    原因分析: 就是platform-tools的版本太低导致的 解决方法: 1.点开SDK Manager,打开SDK Tools面板,将Platform-tools更新 2.更新完之后重启as即可

随机推荐

  1. MongoDB关键指标意义&各数值区间意义&部署

    ## part 1 mms图 What's MMS MongoDB Management Service (MMS) is a suite of services for managing Mongo ...

  2. Oracle的安装+PL安装+系统变量配好后重启

    服务启动后的样子 第一步安装oracle服务 链接: https://pan.baidu.com/s/1sRu95Vy1arc3gfuH9nH5Wg 提取码: eaxx 复制这段内容后打开百度网盘手机 ...

  3. guava学习,集合专题

    lists //JDKList<String> list = new ArrayList<String>();list.add("a");list.add( ...

  4. MongoDB Sharding分片 shell 脚本

    #!/bin/sh CONFIG_NAME=$ CONFIG_PORT=$ SERIAL_NUM=$ STORAGE_HOME=$ if [ ! -n "$CONFIG_NAME" ...

  5. Element UI toggleRowExpansion用法

    背景: 官方说明文档没有具体代码示例 一.官方文档 方法名: toggleRowExpansion 说明: 用于可展开表格,切换某一行的展开状态,如果使用了第二个参数,则是设置这一行展开与否(expa ...

  6. CentOS 6 update curl

    touch /etc/yum.repos.d/city-fan.repo vi /etc/yum.repos.d/city-fan.repo add the following: [CityFan] ...

  7. Mybatis中 Integer 值为0时,默认为空字符串的解决办法。

    需求是查询级别为0的用户 User对象里的level字段的值为0,查询时居然没有查到为level为0的用户. <select id="selectSelective" par ...

  8. .Net Core跨平台应用研究-HelloDDNS(动态域名篇)

    .Net Core跨平台应用研究-HelloDDNS -玩转DDNS 摘要 为解决自己搭建的内网服务器需要域名而因没有超级用户密码不能开启光猫内置DDNS功能的问题,自己动手,基于.net core, ...

  9. CentOS 与Ubuntu 下配置IP地址

    1.CentOS配置方法如下: 用vi打开配置文件 [root@haha3 ~]#  vi /etc/sysconfig/network-scripts/ifcfg-eth0 写入以下配置 DEVIC ...

  10. C# 6.0:新的Dictionary Initializer

    初始化Dictionary不是什么新东西,你可以简单的通过Collection Initializer来初始化一个Dictionary,这是从C#3.0就有的特性.Collection Initial ...