質問編集履歴

2

バージョンアップ

2020/07/15 03:12

投稿

tbc
tbc

スコア11

test CHANGED
File without changes
test CHANGED
@@ -254,6 +254,6 @@
254
254
 
255
255
  同様にインストールしたtensorflowは正常にimportされるようです。
256
256
 
257
- 環境はMacで諸事情で古い10.11、Pythonは3.7.7を使っています。
257
+ Pythonは3.7.7を使っています。
258
258
 
259
259
  試してみるべきことを教えてください。

1

実際に表示された文言を入力しました。

2020/07/15 03:12

投稿

tbc
tbc

スコア11

test CHANGED
@@ -1 +1 @@
1
- kerasが動かない。TypeError: can only concatenate str (not "list") to strと出てしまう。
1
+ kerasが動かない時の対処法を教えてください。TypeError: can only concatenate str (not "list") to strと出てしまう。
test CHANGED
@@ -12,9 +12,243 @@
12
12
 
13
13
  と表示されます。
14
14
 
15
- しかしいざipython3でpythonシェルに入った後import kerasと入力すると色々表示された後
15
+ しかしいざipython3でpythonシェルに入った後import kerasと入力すると色々表示された後
16
+
16
-
17
+ ```ここに言語を入力
18
+
19
+ Using TensorFlow backend.
20
+
21
+ ERROR:root:Internal Python error in the inspect module.
22
+
23
+ Below is the traceback from this internal error.
24
+
25
+ Failed to load the native TensorFlow runtime.
26
+
27
+ Traceback
28
+
29
+ Traceback
30
+
31
+
32
+
33
+ Failed to load the native TensorFlow runtime.
34
+
35
+
36
+
37
+ See https://www.tensorflow.org/install/errors
38
+
39
+
40
+
41
+ for some common reasons and solutions. Include the entire stack trace
42
+
43
+ above this error message when asking for help.
44
+
45
+
46
+
47
+ During handling of the above exception, another exception occurred:
48
+
49
+
50
+
51
+ Traceback (most recent call last):
52
+
53
+ File "/usr/local/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 2044, in showtraceback
54
+
55
+ stb = value._render_traceback_()
56
+
57
+ AttributeError: 'ImportError' object has no attribute '_render_traceback_'
58
+
59
+
60
+
61
+ During handling of the above exception, another exception occurred:
62
+
63
+
64
+
65
+
66
+
67
+ Failed to load the native TensorFlow runtime.
68
+
69
+
70
+
71
+ See https://www.tensorflow.org/install/errors
72
+
73
+
74
+
75
+ for some common reasons and solutions. Include the entire stack trace
76
+
77
+ above this error message when asking for help.
78
+
79
+ ---------------------------------------------------------------------------
80
+
81
+ ImportError Traceback (most recent call last)
82
+
83
+ /usr/local/lib/python3.7/site-packages/tensorflow_core/python/pywrap_tensorflow.py in <module>
84
+
85
+ 57
86
+
87
+ ---> 58 from tensorflow.python.pywrap_tensorflow_internal import *
88
+
89
+ 59 from tensorflow.python.pywrap_tensorflow_internal import __version__
90
+
91
+
92
+
93
+ /usr/local/lib/python3.7/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py in <module>
94
+
95
+ 27 return _mod
96
+
97
+ ---> 28 _pywrap_tensorflow_internal = swig_import_helper()
98
+
99
+ 29 del swig_import_helper
100
+
101
+
102
+
103
+ /usr/local/lib/python3.7/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py in swig_import_helper()
104
+
105
+ 23 try:
106
+
107
+ ---> 24 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
108
+
109
+ 25 finally:
110
+
111
+
112
+
113
+ /usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/imp.py in load_module(name, file, filename, details)
114
+
115
+ 241 else:
116
+
117
+ --> 242 return load_dynamic(name, filename, file)
118
+
119
+ 243 elif type_ == PKG_DIRECTORY:
120
+
121
+
122
+
123
+ /usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/imp.py in load_dynamic(name, path, file)
124
+
125
+ 341 name=name, loader=loader, origin=path)
126
+
127
+ --> 342 return _load(spec)
128
+
129
+ 343
130
+
131
+
132
+
133
+ ImportError: dlopen(/usr/local/lib/python3.7/site-packages/tensorflow_core/python/_pywrap_tensorflow_internal.so, 6): Symbol not found: _SecKeyCopyExternalRepresentation
134
+
135
+ Referenced from: /usr/local/lib/python3.7/site-packages/tensorflow_core/python/../libtensorflow_framework.2.dylib
136
+
137
+ Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
138
+
139
+ in /usr/local/lib/python3.7/site-packages/tensorflow_core/python/../libtensorflow_framework.2.dylib
140
+
141
+
142
+
143
+ During handling of the above exception, another exception occurred:
144
+
145
+
146
+
147
+
148
+
149
+ During handling of the above exception, another exception occurred:
150
+
151
+
152
+
153
+ AttributeError Traceback (most recent call last)
154
+
155
+ /usr/local/lib/python3.7/site-packages/IPython/core/interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
156
+
157
+ 2043 # in the engines. This should return a list of strings.
158
+
159
+ -> 2044 stb = value._render_traceback_()
160
+
161
+ 2045 except Exception:
162
+
163
+
164
+
165
+ AttributeError: 'ImportError' object has no attribute '_render_traceback_'
166
+
167
+
168
+
169
+ During handling of the above exception, another exception occurred:
170
+
171
+
172
+
173
+ TypeError Traceback (most recent call last)
174
+
175
+ /usr/local/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_code(self, code_obj, result, async_)
176
+
177
+ 3346 if result is not None:
178
+
179
+ 3347 result.error_in_exec = sys.exc_info()[1]
180
+
181
+ -> 3348 self.showtraceback(running_compiled_code=True)
182
+
183
+ 3349 else:
184
+
185
+ 3350 outflag = False
186
+
187
+
188
+
189
+ /usr/local/lib/python3.7/site-packages/IPython/core/interactiveshell.py in showtraceback(self, exc_tuple, filename, tb_offset, exception_only, running_compiled_code)
190
+
191
+ 2045 except Exception:
192
+
193
+ 2046 stb = self.InteractiveTB.structured_traceback(etype,
194
+
195
+ -> 2047 value, tb, tb_offset=tb_offset)
196
+
197
+ 2048
198
+
199
+ 2049 self._showtraceback(etype, value, stb)
200
+
201
+
202
+
203
+ /usr/local/lib/python3.7/site-packages/IPython/core/ultratb.py in structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
204
+
205
+ 1413 self.tb = tb
206
+
207
+ 1414 return FormattedTB.structured_traceback(
208
+
209
+ -> 1415 self, etype, value, tb, tb_offset, number_of_lines_of_context)
210
+
211
+ 1416
212
+
213
+ 1417
214
+
215
+
216
+
217
+ /usr/local/lib/python3.7/site-packages/IPython/core/ultratb.py in structured_traceback(self, etype, value, tb, tb_offset, number_of_lines_of_context)
218
+
219
+ 1313 # Verbose modes need a full traceback
220
+
221
+ 1314 return VerboseTB.structured_traceback(
222
+
223
+ -> 1315 self, etype, value, tb, tb_offset, number_of_lines_of_context
224
+
225
+ 1316 )
226
+
227
+ 1317 elif mode == 'Minimal':
228
+
229
+
230
+
231
+ /usr/local/lib/python3.7/site-packages/IPython/core/ultratb.py in structured_traceback(self, etype, evalue, etb, tb_offset, number_of_lines_of_context)
232
+
233
+ 1181 exception = self.get_parts_of_chained_exception(evalue)
234
+
235
+ 1182 if exception:
236
+
237
+ -> 1183 formatted_exceptions += self.prepare_chained_exception_message(evalue.__cause__)
238
+
239
+ 1184 etype, evalue, etb = exception
240
+
241
+ 1185 else:
242
+
243
+
244
+
17
- typeError: can only concatenate str (not "list") to str
245
+ TypeError: can only concatenate str (not "list") to str
246
+
247
+
248
+
249
+
250
+
251
+ ```
18
252
 
19
253
  と出ます。
20
254