本文记录了博主在Python下import torch出现的如题报错的解决方案。更新于2019.03.20。

这个报错是由于当前的numpy版本不符合要求造成的。

首先在终端运行:

python
import numpy
numpy.version

查看当前numpy的版本。之后运行

pip3 install --upgrade numpy

更新numpy版本就可以了。如果是python2,用pip

更多内容,欢迎加入星球讨论。

【已解决】RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb相关推荐

  1. 解决 RuntimeError: module compiled against API version 0xf but this version of numpy is 0xd

    背景 最近在运行一个Python项目的时候,报错RuntimeError: module compiled against API version 0xf but this version of nu ...

  2. python numpy 版本问题:error module compiled against API version 0xc but this version of numpy is 0xb

    问题描述: 安装完gym之后,又安装了一些其他包,之后再使用gym出现如下错误: RuntimeError: module compiled against API version 0xc but t ...

  3. 解决:UserWarning: Failed to initialize NumPy: module compiled against API version 0xf but this version

    1.问题 import torch时报错:UserWarning: Failed to initialize NumPy: module compiled against API version 0x ...

  4. module compiled against API version 0xb but this version of numpy is 0xa

    module compiled against API version 0xb but this version of numpy is 0xa pip install --upgrade numpy ...

  5. 已解决RuntimeError: CUDA error: device-side assert triggered异常的正确解决方法,亲测有效!!!

    已解决RuntimeError: CUDA error: device-side assert triggered异常的正确解决方法,亲测有效!!! 文章目录 报错问题 解决方法 福利 报错问题 粉丝 ...

  6. 已解决AttributeError: module ‘tkinter‘ has no attribute ‘TK

    已解决Python小白初学GUI时使用到tkinter包,抛出异常AttributeError: module 'tkinter' has no attribute 'TK的正确解决方法,亲测有效!! ...

  7. 已解决No module named ‘flask_misaka‘【BUG解决】

    项目场景: pycharm安装flask-misaka失败 Collecting misakaUsing cached https://files.pythonhosted.org/packages/ ...

  8. 已解决:module ‘google.protobuf.descriptor‘ has no attribute ‘_internal_create_key‘

    今天在虚拟机中想使用 keras_tuner,结果导入 keras_tuner 之后在 jupyter 中报错: module 'google.protobuf.descriptor' has no ...

  9. 已解决RuntimeError: Distributed package doesn‘t have NCCL built in

    在运行Robust High-Resolution Video Matting with Temporal Guidance论文的代码过程中,遇到了如下问题: RuntimeError: Distri ...

最新文章

  1. one方法报错 select_【总结】Pandas DataFrame 使用方法
  2. 遇到问题描述:Android Please ensure that adb is correctly located at问题解决
  3. python安装成功第三方库但import出问题_为什么会在pyspark在RDD中调用python第三方库失败?...
  4. 下一代网络安全将全部基于行为识别
  5. Spring boot 默认日志配置
  6. android开发出现的错误,android 开发 错误集锦
  7. Windows计算机功能Java源码
  8. jQuery中ready与load事件的区别
  9. 为脚本语言平反-JavaScript篇(3)
  10. springcloud架构特点_打造企业级微服务平台架构,分布式应用场景管理
  11. android viewdraghelper 点击移动,ViewDragHelper使用时遇到的问题
  12. python 读取网页并分词
  13. HTML5基础知识习题 一
  14. Python 编程语言
  15. 高德地图与百度地图的经纬度偏差纠正
  16. 华为是不是培养人工智能人才花费最大的公司?
  17. Markdown中表格中内容换行、左对齐等基本操作
  18. J2EE进阶之tomcat服务器搭建,HTTP协议 八
  19. URP关于多个摄相机的性能优化
  20. oracle共几条当前几条,Oracle 以某字段分组,以某字段排序,取前几条

热门文章

  1. 【夜读】丰富自己的4个习惯,请逼自己养成
  2. 索尼发布新款VR头盔与FB竞争,暂未公布定价
  3. 根据出行月份(1~12)和仓位(头等舱1,经济舱2)输出实际机票价格。
  4. 导出公众号历史文章,批量下载微信公众号数据分析
  5. Flutter仿网易云音乐 ---基础准备
  6. 激活函数(Activation Function)及十大常见激活函数
  7. 如何使用cmd命令提示符执行ipconfig、ping命令
  8. ArcGIS中坐标转换与投影变换
  9. 专用微处理器电源监控和看门狗芯片--MAX708
  10. gnuplot软件学习笔记