質問編集履歴

6

修正

2019/12/26 06:38

投稿

python_2019
python_2019

スコア68

test CHANGED
File without changes
test CHANGED
@@ -206,10 +206,6 @@
206
206
 
207
207
  解決しました!
208
208
 
209
- import keras
210
-
211
- を追記すると、正常に実行されました。
212
-
213
209
 
214
210
 
215
211
  お騒がせしました。

5

追記

2019/12/26 06:38

投稿

python_2019
python_2019

スコア68

test CHANGED
File without changes
test CHANGED
@@ -201,3 +201,17 @@
201
201
  [4900] Failed to execute script keras_1_exe_1
202
202
 
203
203
  ```
204
+
205
+
206
+
207
+ 解決しました!
208
+
209
+ import keras
210
+
211
+ を追記すると、正常に実行されました。
212
+
213
+
214
+
215
+ お騒がせしました。
216
+
217
+ ありがとうございました。

4

エラーを追記

2019/12/26 06:21

投稿

python_2019
python_2019

スコア68

test CHANGED
File without changes
test CHANGED
@@ -177,3 +177,27 @@
177
177
  [11516] Failed to execute script keras_1_exe_1
178
178
 
179
179
  ```
180
+
181
+
182
+
183
+ エラーを追記しました。
184
+
185
+ ```ここに言語を入力
186
+
187
+ (base) C:\python\test\dist\keras_1_exe_1>keras_1_exe_1.exe
188
+
189
+ c:\python\anaconda\pgm\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:627: MatplotlibDeprecationWarning:
190
+
191
+ The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
192
+
193
+ exec(bytecode, module.__dict__)
194
+
195
+ Traceback (most recent call last):
196
+
197
+ File "keras_1_exe_1.py", line 19, in <module>
198
+
199
+ ModuleNotFoundError: No module named 'keras'
200
+
201
+ [4900] Failed to execute script keras_1_exe_1
202
+
203
+ ```

3

エラーを追記

2019/12/26 05:54

投稿

python_2019
python_2019

スコア68

test CHANGED
File without changes
test CHANGED
@@ -145,3 +145,35 @@
145
145
  フォルダ構成は以下の通りです。
146
146
 
147
147
  ![イメージ説明](55eea6c6061fbba4f04becd45152167e.jpeg)
148
+
149
+
150
+
151
+ importを文頭にまとめて実行した場合のエラーです。
152
+
153
+ ```ここに言語を入力
154
+
155
+ (base) C:\python\test\dist\keras_1_exe_1>keras_1_exe_1.exe
156
+
157
+ Traceback (most recent call last):
158
+
159
+ File "keras_1_exe_1.py", line 8, in <module>
160
+
161
+ File "c:\python\anaconda\pgm\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
162
+
163
+ exec(bytecode, module.__dict__)
164
+
165
+ File "site-packages\numpy\__init__.py", line 150, in <module>
166
+
167
+ File "c:\python\anaconda\pgm\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
168
+
169
+ exec(bytecode, module.__dict__)
170
+
171
+ File "site-packages\numpy\random\__init__.py", line 180, in <module>
172
+
173
+ File "mtrand.pyx", line 1, in init numpy.random.mtrand
174
+
175
+ ModuleNotFoundError: No module named 'numpy.random.common'
176
+
177
+ [11516] Failed to execute script keras_1_exe_1
178
+
179
+ ```

2

フォルダ構成を追記

2019/12/26 03:58

投稿

python_2019
python_2019

スコア68

test CHANGED
File without changes
test CHANGED
@@ -141,3 +141,7 @@
141
141
  ご指導頂ければ助かります。
142
142
 
143
143
  ```
144
+
145
+ フォルダ構成は以下の通りです。
146
+
147
+ ![イメージ説明](55eea6c6061fbba4f04becd45152167e.jpeg)

1

追記しました。

2019/12/26 03:20

投稿

python_2019
python_2019

スコア68

test CHANGED
File without changes
test CHANGED
@@ -109,3 +109,35 @@
109
109
  何が原因なのか全く不明です。
110
110
 
111
111
  どなたか、アドバイスをお願いできませんでしょうか?
112
+
113
+
114
+
115
+
116
+
117
+ 以下、追記です。
118
+
119
+ ```ここに言語を入力
120
+
121
+ 以下のようにコマンドプロンプトから実行してみました。
122
+
123
+ (base) C:\python\test\dist\keras_1_exe_1>keras_1_exe_1.exe
124
+
125
+
126
+
127
+ すると、以下のようなメッセージが出ました。
128
+
129
+ Traceback (most recent call last):
130
+
131
+ File "keras_1_exe_1.py", line 10, in <module>
132
+
133
+ FileNotFoundError: [Errno 2] No such file or directory: 'finalized_model_keras_1.sav'
134
+
135
+ [14252] Failed to execute script keras_1_exe_1
136
+
137
+
138
+
139
+ savファイルは確かに存在しているのですが、なぜかNotfoundになっています。
140
+
141
+ ご指導頂ければ助かります。
142
+
143
+ ```