LoginSignup
0
1

More than 5 years have passed since last update.

TensorFlowでimport Errorが起きる

Posted at

はじめに

TensorFlowをimportしようとしたところ、下記のエラーが生じ、import できませんでした。

ImportError: dlopen(/Users/xxx/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): no suitable image found. 
Did find:
    /Users/xxx/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03

原因と解決策

対応環境の異なるTensorFlowをインストールしておりました。
(Mac CPUに対して、GPU版をインストール)

TensorFlowを一度アンインストールした上で、再インストールすることで解決しました。

参考サイト

こちらを参考にしました。

参考:Requiring tensorflow with Python 2.7.11 occurs ImportError

ありがとうございました。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1