解决办法: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.

猜你喜欢

转载自blog.csdn.net/quantum7/article/details/88708746