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

使用TensorFlow 会涉及到使用numpy,但会出现API版本不匹配问题:

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

要么是numpy有多个版本(此时tensorflow自动选择最低版本的numpy),要么是numpy只有最低版本。

RuntimeError: module compiled against API version 0xa but this version of numpy is 0xb_第1张图片

解决办法:在命令下输入pip install -U numpy升级numpy包,然后问题就解决了

RuntimeError: module compiled against API version 0xa but this version of numpy is 0xb_第2张图片

 

你可能感兴趣的:(Python)