のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

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

!python main.py 64 64 --backend tensorflow --nb_epoch 10
Using TensorFlow backend.
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core.umath failed to import
ImportError: numpy.core.umath failed to import
2018-10-27 06:04:49.233771: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr 
!pip list | grep numpy
numpy                    1.13.3    
import numpy as np
print(np.__version__)
1.13.3

これで、1.15.3へアップしたら、動作するようになった。

pip install numpy --upgrade

前の方の行で、1.13.3を入れてるので、これを変えればいいと思う。

!pip install numpy==1.13.3

stackoverflow.com



qiita.com