0
点赞
收藏
分享

微信扫一扫

导入spacy报错 module compiled against API version 0xe but this version of numpy is 0xd.

幸福的无所谓 2022-04-13 阅读 82
python

在import spacy 时,发现无法导入,返回了一个error:The signature was () -> handle,然后我就往上翻翻,发现了

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

上面的错误意思由于当前的numpy版本不符合要求造成的。

让我升级numpy的版本,而现在我的numpy版本为 1.19.3,但如果我直接对numpy升级,

pip install -U numpy

会发现报了新错误,新报错大概是说numpy版本和tensorflow版本之间的产生了冲突,所以不能直接将numpy的版本升级为最新版本。

最后我将我的numpy版本升级为1.20,然后问题解决了,不再报错了。

pip install --user numpy==1.20
举报

相关推荐

0 条评论