1. 程式人生 > >RuntimeError: module compiled against API version 0xa but this version of numpy is 0xb

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只有最低版本。

解決辦法:在命令下輸入pip install -U numpy升級numpy包,然後問題就解決了