テンソルフローのためにpip install
を実行しました。 Pythonのコマンドライン環境の下でテンソルフローをインポートする際のnumpyバージョンエラー
、私は
import tensorflow as tf
をしようとしたとき、私は次のエラーを満たし:
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: numpy.core.multiarray failed to import
私はprint numpy.__version__
を使用して、私のnumpy
バージョンをチェックしています。それは"1.8.2"
を示しました。では、私は今何をすべきですか?ありがとう!
あなたがnumpyのをアップグレードする必要があるように見えます。おそらく 'pip install --upgrade numpy' – mgilson
はい、テンソルフロー固有の問題ではないようですね、参考、http://stackoverflow.com/questions/33859531/runtimeerror-module-compiled-against-api-version-a-but-このバージョンのnumpyは –
です。 "pip install --upgrade numpy"を試しました。しかし、それは私がすでに最新バージョンをインストールしていると私に言った。 – ReadyOrNot