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

Posted gcygeeker

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决 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 numpy is 0xd导致项目无法运行,查阅资料后发现是numpy这个包版本太低导致的,解决方法是升级numpy版本。方法贴在这里,供遇到同样问题的小伙伴参考。

解决方法

$ pip install numpy --upgrade

参考资料1
参考资料2

以上是关于解决 RuntimeError: module compiled against API version 0xf but this version of numpy is 0xd的主要内容,如果未能解决你的问题,请参考以下文章

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

RuntimeError: Python is not installed as a framework 错误解决方案

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

RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd

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