解决办法:RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa

简介: 解决办法:RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa

运行遇到错误如下:


RuntimeError: module compiled against API version 0xc but this version of numpy is 0xa

 刚刚做了什么?python2.7下,numpy降级了.可是吾已经编译过了啊.这是怎么回事?


 网上都说升级numpy.可是咱明明是降级啊.为什么要降级?肯定迫不得已.怎么办?


 首先排查哪里出了问题.从第一个Py文件开始,吾到处加以下语句.


import sys
print(sys._getframe().f_lineno)

 最终确定,是跟tensorrt相关.解决办法有:


 如果没有用到tensorrt,删除之.


 用到了,安装其他版本的库.


 改用Python3.5.

目录
相关文章
|
数据处理 Python
AttributeError: module ‘numpy‘ has no attribute ‘array‘解决办法
AttributeError: module ‘numpy‘ has no attribute ‘array‘解决办法
771 0
|
3月前
|
Python
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support
本文讨论了在NumPy 2.0.0版本更新后可能出现的兼容性问题,并提供了通过降级NumPy版本至1.x的解决方法,以支持尚未更新的模块或库。
|
3月前
|
Python
module 'numpy' has no attribute 'int'.
module 'numpy' has no attribute 'int'.
112 0
|
6月前
|
Python
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
93 0
|
6月前
|
Python
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
AttributeError: module ‘numpy‘ has no attribute ‘int‘.
126 0
|
6月前
|
Shell 计算机视觉 Python
no module named cv2 、numpy 、xxx超全解决方案
no module named cv2 、numpy 、xxx超全解决方案
|
TensorFlow 算法框架/工具 计算机视觉
No module named ‘cv2‘ 解决办法 (No module named ‘numpy‘ 等所有报错均可解决)
No module named ‘cv2‘ 解决办法 (No module named ‘numpy‘ 等所有报错均可解决)
|
TensorFlow 算法框架/工具
TensorFlow修改图像尺寸:AttributeError: module ‘tensorflow._api.v2.image‘ has no attribute ‘image‘
TensorFlow修改图像尺寸:AttributeError: module ‘tensorflow._api.v2.image‘ has no attribute ‘image‘
129 0
TensorFlow修改图像尺寸:AttributeError: module ‘tensorflow._api.v2.image‘ has no attribute ‘image‘
|
Python
Scrapy运行发生No module named ‘win32api‘报错解决方案
Scrapy运行发生No module named ‘win32api‘报错解决方案
169 0
Scrapy运行发生No module named ‘win32api‘报错解决方案
|
Python
python3中报错No module named 'numpy'
python3中报错No module named 'numpy'
318 0