teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

 

2015/11/25 12:10

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -8,20 +8,20 @@
8
8
 
9
9
  ```
10
10
  Traceback (most recent call last):
11
- File "hello-tf.py", line 1, in <module>
11
+ File "hello-tf.py", line 1, in <module>
12
- import tensorflow as tf
12
+ import tensorflow as tf
13
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module>
13
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module>
14
- from tensorflow.python import *
14
+ from tensorflow.python import *
15
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 22, in <module>
15
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 22, in <module>
16
- from tensorflow.python.client.client_lib import *
16
+ from tensorflow.python.client.client_lib import *
17
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/client_lib.py", line 35, in <module>
17
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/client_lib.py", line 35, in <module>
18
- from tensorflow.python.client.session import InteractiveSession
18
+ from tensorflow.python.client.session import InteractiveSession
19
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 11, in <module>
19
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 11, in <module>
20
- from tensorflow.python import pywrap_tensorflow as tf_session
20
+ from tensorflow.python import pywrap_tensorflow as tf_session
21
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
21
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
22
- _pywrap_tensorflow = swig_import_helper()
22
+ _pywrap_tensorflow = swig_import_helper()
23
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
23
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
24
- _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
24
+ _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
25
25
  ImportError: libcudart.so.7.0: cannot open shared object file: No such file or directory
26
26
  ```
27
27
 

3

もう少しわかりやすくしました

2015/11/25 12:10

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -5,48 +5,8 @@
5
5
  ↓このコマンドのところでエラーが発生してしまいました。
6
6
  $python hello-tf.py
7
7
 
8
- エラー内容は以下のとおりです。
9
- ```
10
- Traceback (most recent call last):
11
- File "hello-tf.py", line 1, in <module>
12
- import tensorflow as tf
13
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module>
14
- from tensorflow.python import *
15
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 22, in <module>
16
- from tensorflow.python.client.client_lib import *
17
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/client_lib.py", line 35, in <module>
18
- from tensorflow.python.client.session import InteractiveSession
19
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 11, in <module>
20
- from tensorflow.python import pywrap_tensorflow as tf_session
21
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
22
- _pywrap_tensorflow = swig_import_helper()
23
- File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
24
- _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
25
- ImportError: /root/tensorflow/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: invalid ELF header
26
- ```
27
8
 
28
- おそらく以下の箇所でエラーが発生しているようですが全く原因がわかりません
29
- import tensorflow as tf
30
-
31
- どなたかわかる方いましたら教えて下さい。
32
-
33
-
34
-
35
- 追記
36
- すいません
37
- 上記のサイトはmac環境の解説だったようです
38
- 私の環境はcentosなので以下のコマンドからインストール
39
- することにしました。
40
9
  ```
41
- pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
42
-
43
- ```
44
- でも、さいど以下のコマンドを叩くと今度は別のエラーが
45
- 表示されるようになってしまいました。
46
- $python hello-tf.py
47
-
48
- ```
49
- python hello-tf.py
50
10
  Traceback (most recent call last):
51
11
  File "hello-tf.py", line 1, in <module>
52
12
  import tensorflow as tf

2

質問微変更しました

2015/11/25 12:09

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -28,4 +28,41 @@
28
28
  おそらく以下の箇所でエラーが発生しているようですが全く原因がわかりません
29
29
  import tensorflow as tf
30
30
 
31
- どなたかわかる方いましたら教えて下さい。
31
+ どなたかわかる方いましたら教えて下さい。
32
+
33
+
34
+
35
+ 追記
36
+ すいません
37
+ 上記のサイトはmac環境の解説だったようです
38
+ 私の環境はcentosなので以下のコマンドからインストール
39
+ することにしました。
40
+ ```
41
+ pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
42
+
43
+ ```
44
+ でも、さいど以下のコマンドを叩くと今度は別のエラーが
45
+ 表示されるようになってしまいました。
46
+ $python hello-tf.py
47
+
48
+ ```
49
+ python hello-tf.py
50
+ Traceback (most recent call last):
51
+ File "hello-tf.py", line 1, in <module>
52
+ import tensorflow as tf
53
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module>
54
+ from tensorflow.python import *
55
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 22, in <module>
56
+ from tensorflow.python.client.client_lib import *
57
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/client_lib.py", line 35, in <module>
58
+ from tensorflow.python.client.session import InteractiveSession
59
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 11, in <module>
60
+ from tensorflow.python import pywrap_tensorflow as tf_session
61
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
62
+ _pywrap_tensorflow = swig_import_helper()
63
+ File "/root/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
64
+ _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
65
+ ImportError: libcudart.so.7.0: cannot open shared object file: No such file or directory
66
+ ```
67
+
68
+ こちらのエラーの解決方法がわかる方いたら教えて頂けますでしょうか?

1

変更しました

2015/11/24 13:07

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -25,5 +25,7 @@
25
25
  ImportError: /root/tensorflow/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: invalid ELF header
26
26
  ```
27
27
 
28
- 原因がわかりません
28
+ おそらく以下の箇所でエラーが発生しているようですが全く原因がわかりません
29
+ import tensorflow as tf
30
+
29
31
  どなたかわかる方いましたら教えて下さい。