質問編集履歴
8
補足図追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -146,4 +146,8 @@
|
|
146
146
|
OS:windows10 64bit
|
147
147
|
Python:3.8.3
|
148
148
|
pip:21.0.1
|
149
|
-
pyinstaller:4.2
|
149
|
+
pyinstaller:4.2
|
150
|
+
|
151
|
+
### Marusoftware様へ回答 補足画像
|
152
|
+
exe実行後に表示された画像は下図の通りです。
|
153
|
+

|
7
ログ修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -134,6 +134,13 @@
|
|
134
134
|
20806 INFO: Building EXE from EXE-00.toc completed successfully.
|
135
135
|
```
|
136
136
|
|
137
|
+
|
138
|
+
↓ コマンドプロンプト実行時ログ
|
139
|
+
|
140
|
+
```CommandPromptLog
|
141
|
+
[12960] LOADER: Error activating the context: ActivateActCtx:
|
142
|
+
既定のアクティブ化コンテキストのプロセスは既に設定されていたため、既定のアクティブ化コンテキストのプロセスを設定する試みは失敗しました。
|
143
|
+
```
|
137
144
|
### 補足情報(環境)
|
138
145
|
|
139
146
|
OS:windows10 64bit
|
6
ログ修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -53,93 +53,85 @@
|
|
53
53
|
|
54
54
|
pyinstaller実行時のログは下記通りです。
|
55
55
|
```PyinstallerLog
|
56
|
-
(base) PS C:\Users\user\RPA> pyinstaller excel_test.
|
56
|
+
(base) PS C:\Users\user\RPA> pyinstaller excel_test.ipynb --onefile --additional-hooks-dir=./hooks/ --debug all
|
57
|
-
|
57
|
+
2104 INFO: PyInstaller: 4.2
|
58
|
-
|
58
|
+
2104 INFO: Python: 3.8.3 (conda)
|
59
|
-
|
59
|
+
2106 INFO: Platform: Windows-10-10.0.19041-SP0
|
60
|
+
2116 INFO: wrote C:\Users\user\RPA\excel_test.spec
|
60
|
-
|
61
|
+
2122 INFO: UPX is not available.
|
61
|
-
|
62
|
+
2137 INFO: Extending PYTHONPATH with paths
|
62
63
|
['C:\Users\user\RPA', 'C:\Users\user\RPA']
|
63
|
-
|
64
|
+
2237 INFO: checking Analysis
|
64
|
-
|
65
|
+
2257 INFO: Building because noarchive changed
|
65
|
-
|
66
|
+
2257 INFO: Initializing module dependency graph...
|
66
|
-
|
67
|
+
2271 INFO: Caching module graph hooks...
|
67
|
-
|
68
|
+
2288 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
|
68
|
-
|
69
|
+
2303 INFO: Analyzing base_library.zip ...
|
69
|
-
|
70
|
+
9276 INFO: Processing pre-find module path hook distutils from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
|
70
|
-
|
71
|
+
9278 INFO: distutils: retargeting to non-venv dir 'c:\users\user\anaconda3\lib'
|
71
|
-
|
72
|
+
14795 INFO: Caching module dependency graph...
|
72
|
-
|
73
|
+
15069 INFO: running Analysis Analysis-00.toc
|
73
|
-
|
74
|
+
15099 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
|
74
75
|
required by c:\users\user\anaconda3\python.exe
|
75
|
-
|
76
|
+
15498 INFO: Analyzing C:\Users\user\RPA\excel_test.ipynb
|
76
|
-
|
77
|
+
15502 INFO: Processing module hooks...
|
77
|
-
|
78
|
+
15503 INFO: Loading module hook 'hook-difflib.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
78
|
-
|
79
|
+
15513 INFO: Excluding import of doctest from module difflib
|
79
|
-
|
80
|
+
15514 INFO: Loading module hook 'hook-distutils.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
80
|
-
|
81
|
+
15517 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
81
|
-
|
82
|
+
15528 INFO: Excluding import of lib2to3.refactor from module distutils.util
|
82
|
-
|
83
|
+
15529 INFO: Loading module hook 'hook-encodings.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
83
|
-
|
84
|
+
15663 INFO: Loading module hook 'hook-heapq.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
84
|
-
|
85
|
+
15667 INFO: Excluding import of doctest from module heapq
|
85
|
-
|
86
|
+
15667 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
86
|
-
|
87
|
+
15732 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
87
|
-
|
88
|
+
15735 INFO: Excluding import of test.support from module multiprocessing.util
|
88
|
-
|
89
|
+
15735 INFO: Excluding import of test from module multiprocessing.util
|
89
|
-
|
90
|
+
15743 INFO: Loading module hook 'hook-pickle.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
90
|
-
|
91
|
+
15747 INFO: Excluding import of argparse from module pickle
|
91
|
-
|
92
|
+
15748 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
92
|
-
|
93
|
+
15750 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
93
|
-
|
94
|
+
15760 INFO: Loading module hook 'hook-xml.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
94
|
-
|
95
|
+
16015 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
95
|
-
|
96
|
+
16253 INFO: checking Tree
|
96
|
-
12298 INFO: Building Tree because Tree-00.toc is non existent
|
97
|
-
12298 INFO: Building Tree Tree-00.toc
|
98
|
-
|
97
|
+
16320 INFO: checking Tree
|
99
|
-
12376 INFO: Building Tree because Tree-01.toc is non existent
|
100
|
-
12376 INFO: Building Tree Tree-01.toc
|
101
|
-
|
98
|
+
16466 INFO: checking Tree
|
102
|
-
12501 INFO: Building Tree because Tree-02.toc is non existent
|
103
|
-
12501 INFO: Building Tree Tree-02.toc
|
104
|
-
|
99
|
+
16498 INFO: Looking for ctypes DLLs
|
105
|
-
|
100
|
+
16568 INFO: Analyzing run-time hooks ...
|
106
|
-
|
101
|
+
16577 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py'
|
107
|
-
|
102
|
+
16584 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_win32api.py'
|
108
|
-
|
103
|
+
16617 INFO: Looking for dynamic libraries
|
109
|
-
|
104
|
+
16901 INFO: Looking for eggs
|
110
|
-
|
105
|
+
16902 INFO: Using Python library c:\users\user\anaconda3\python38.dll
|
111
|
-
|
106
|
+
16904 INFO: Found binding redirects:
|
112
107
|
[]
|
113
|
-
|
108
|
+
17344 INFO: Warnings written to C:\Users\user\RPA\build\excel_test\warn-excel_test.txt
|
114
|
-
|
109
|
+
17427 INFO: Graph cross-reference written to C:\Users\user\RPA\build\excel_test\xref-excel_test.html
|
115
|
-
|
110
|
+
17446 INFO: checking PYZ
|
116
|
-
|
111
|
+
17466 INFO: Building because toc changed
|
117
|
-
|
112
|
+
17467 INFO: Building PYZ (ZlibArchive) C:\Users\user\RPA\build\excel_test\PYZ-00.pyz
|
118
|
-
|
113
|
+
17468 INFO: Building PYZ (ZlibArchive) C:\Users\user\RPA\build\excel_test\PYZ-00.pyz completed successfully.
|
119
|
-
|
114
|
+
17485 INFO: checking PKG
|
120
|
-
|
115
|
+
17504 INFO: Building because toc changed
|
121
|
-
|
116
|
+
17504 INFO: Building PKG (CArchive) PKG-00.pkg
|
122
|
-
|
117
|
+
20434 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
|
123
|
-
|
118
|
+
20452 INFO: Bootloader c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run_d.exe
|
124
|
-
|
119
|
+
20452 INFO: checking EXE
|
125
|
-
|
120
|
+
20468 INFO: Building because debug changed
|
126
|
-
|
121
|
+
20469 INFO: Building EXE from EXE-00.toc
|
127
|
-
|
122
|
+
20482 INFO: Copying icons from ['c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\images\icon-console.ico']
|
128
|
-
|
123
|
+
20584 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
|
129
|
-
|
124
|
+
20585 INFO: Writing RT_ICON 1 resource with 3752 bytes
|
130
|
-
|
125
|
+
20586 INFO: Writing RT_ICON 2 resource with 2216 bytes
|
131
|
-
|
126
|
+
20596 INFO: Writing RT_ICON 3 resource with 1384 bytes
|
132
|
-
|
127
|
+
20597 INFO: Writing RT_ICON 4 resource with 37019 bytes
|
133
|
-
|
128
|
+
20597 INFO: Writing RT_ICON 5 resource with 9640 bytes
|
134
|
-
|
129
|
+
20598 INFO: Writing RT_ICON 6 resource with 4264 bytes
|
135
|
-
|
130
|
+
20599 INFO: Writing RT_ICON 7 resource with 1128 bytes
|
131
|
+
20604 INFO: Updating manifest in C:\Users\user\RPA\build\excel_test\run_d.exe.0zcjq27_
|
132
|
+
20698 INFO: Updating resource type 24 name 1 language 0
|
136
|
-
|
133
|
+
20704 INFO: Appending archive to EXE C:\Users\user\RPA\dist\excel_test.exe
|
137
|
-
|
134
|
+
20806 INFO: Building EXE from EXE-00.toc completed successfully.
|
138
|
-
13985 INFO: checking COLLECT
|
139
|
-
13985 INFO: Building COLLECT because COLLECT-00.toc is non existent
|
140
|
-
13985 INFO: Building COLLECT COLLECT-00.toc
|
141
|
-
14501 INFO: Building COLLECT COLLECT-00.toc completed successfully.
|
142
|
-
(base) PS C:\Users\user\RPA>
|
143
135
|
```
|
144
136
|
|
145
137
|
### 補足情報(環境)
|
5
ログ追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -22,60 +22,124 @@
|
|
22
22
|
```
|
23
23
|
|
24
24
|
|
25
|
-
- エラー確認
|
26
|
-
|
25
|
+
### 追記:hookファイル(3月7日)
|
27
|
-
|
26
|
+
こちらの記事を参考に進めています。
|
27
|
+
https://teratail.com/questions/184343
|
28
28
|
|
29
|
+
元々Pyinstaller実行時に下記エラーが発生していました。
|
29
30
|
|
30
|
-
### 補足情報:specファイル
|
31
|
-
|
31
|
+
↓ Pyinstaller実行時のエラー
|
32
|
+
```pyinstaller
|
33
|
+
WARNING: lib not found:
|
32
34
|
|
33
|
-
冒頭の「エラーなしでexeファイルを開くところまでできた」の記載に関して、
|
34
|
-
この時のエラーはjupyter Notebookで空白の行
|
35
|
-
(という表現で合っているのかわかりませんが)があった事が原因であったため、
|
36
|
-
|
35
|
+
```
|
37
36
|
|
37
|
+
上記記事を参考に下記コードのファイルを作成しました。
|
38
|
+
```Python
|
39
|
+
from PyInstaller.utils.hooks import collect_data_files
|
40
|
+
datas = collect_data_files('pyautogui')
|
38
41
|
|
42
|
+
```
|
39
|
-
|
43
|
+
保存場所及びファイル名:
|
40
|
-
```ExcelTestSpec
|
41
|
-
|
44
|
+
./hooks/hook-pyautogui.ipynb
|
42
45
|
|
46
|
+
pyinstaller実行時のコードは下記で行いました。
|
43
|
-
|
47
|
+
```AnacondaPowerShell
|
48
|
+
pyinstaller excel_test.ipynb --onefile --additional-hooks-dir=./hooks/ --debug all
|
49
|
+
```
|
50
|
+
元々発生していた「lib not found」は発生していないので、
|
51
|
+
pyautoguiをimportできたと考えています。
|
52
|
+
しかし、exeファイルを実行しても「exe化テスト」のポップアップは表示されません。
|
44
53
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
54
|
+
pyinstaller実行時のログは下記通りです。
|
55
|
+
```PyinstallerLog
|
56
|
+
(base) PS C:\Users\user\RPA> pyinstaller excel_test.spec --onefile --noconsole
|
57
|
+
1549 INFO: PyInstaller: 4.2
|
58
|
+
1549 INFO: Python: 3.8.3 (conda)
|
59
|
+
1549 INFO: Platform: Windows-10-10.0.19041-SP0
|
60
|
+
1549 INFO: UPX is not available.
|
61
|
+
1564 INFO: Extending PYTHONPATH with paths
|
62
|
+
['C:\Users\user\RPA', 'C:\Users\user\RPA']
|
63
|
+
1635 INFO: checking Analysis
|
64
|
+
1635 INFO: Building Analysis because Analysis-00.toc is non existent
|
65
|
+
1635 INFO: Initializing module dependency graph...
|
66
|
+
1651 INFO: Caching module graph hooks...
|
67
|
+
1667 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
|
68
|
+
1682 INFO: Analyzing base_library.zip ...
|
69
|
+
7019 INFO: Processing pre-find module path hook distutils from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
|
70
|
+
7019 INFO: distutils: retargeting to non-venv dir 'c:\users\user\anaconda3\lib'
|
71
|
+
11185 INFO: Caching module dependency graph...
|
72
|
+
11373 INFO: running Analysis Analysis-00.toc
|
73
|
+
11404 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
|
74
|
+
required by c:\users\user\anaconda3\python.exe
|
75
|
+
11685 INFO: Analyzing excel_test.ipynb
|
76
|
+
11701 INFO: Processing module hooks...
|
77
|
+
11701 INFO: Loading module hook 'hook-difflib.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
78
|
+
11701 INFO: Excluding import of doctest from module difflib
|
79
|
+
11701 INFO: Loading module hook 'hook-distutils.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
80
|
+
11701 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
81
|
+
11701 INFO: Excluding import of lib2to3.refactor from module distutils.util
|
82
|
+
11701 INFO: Loading module hook 'hook-encodings.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
83
|
+
11826 INFO: Loading module hook 'hook-heapq.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
84
|
+
11826 INFO: Excluding import of doctest from module heapq
|
85
|
+
11826 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
86
|
+
11873 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
87
|
+
11873 INFO: Excluding import of test.support from module multiprocessing.util
|
88
|
+
11873 INFO: Excluding import of test from module multiprocessing.util
|
89
|
+
11873 INFO: Loading module hook 'hook-pickle.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
90
|
+
11873 INFO: Excluding import of argparse from module pickle
|
91
|
+
11873 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
92
|
+
11889 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
93
|
+
11889 INFO: Loading module hook 'hook-xml.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
94
|
+
12094 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
95
|
+
12298 INFO: checking Tree
|
96
|
+
12298 INFO: Building Tree because Tree-00.toc is non existent
|
97
|
+
12298 INFO: Building Tree Tree-00.toc
|
98
|
+
12376 INFO: checking Tree
|
99
|
+
12376 INFO: Building Tree because Tree-01.toc is non existent
|
100
|
+
12376 INFO: Building Tree Tree-01.toc
|
101
|
+
12501 INFO: checking Tree
|
102
|
+
12501 INFO: Building Tree because Tree-02.toc is non existent
|
103
|
+
12501 INFO: Building Tree Tree-02.toc
|
104
|
+
12532 INFO: Looking for ctypes DLLs
|
105
|
+
12595 INFO: Analyzing run-time hooks ...
|
106
|
+
12595 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py'
|
107
|
+
12595 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_win32api.py'
|
108
|
+
12626 INFO: Looking for dynamic libraries
|
109
|
+
12845 INFO: Looking for eggs
|
110
|
+
12845 INFO: Using Python library c:\users\user\anaconda3\python38.dll
|
111
|
+
12845 INFO: Found binding redirects:
|
112
|
+
[]
|
113
|
+
12845 INFO: Warnings written to C:\Users\user\RPA\build\excel_test\warn-excel_test.txt
|
114
|
+
12907 INFO: Graph cross-reference written to C:\Users\user\RPA\build\excel_test\xref-excel_test.html
|
115
|
+
12923 INFO: checking PYZ
|
116
|
+
12923 INFO: Building PYZ because PYZ-00.toc is non existent
|
117
|
+
12923 INFO: Building PYZ (ZlibArchive) C:\Users\user\RPA\build\excel_test\PYZ-00.pyz
|
118
|
+
13751 INFO: Building PYZ (ZlibArchive) C:\Users\user\RPA\build\excel_test\PYZ-00.pyz completed successfully.
|
119
|
+
13766 INFO: checking PKG
|
120
|
+
13782 INFO: Building PKG because PKG-00.toc is non existent
|
121
|
+
13782 INFO: Building PKG (CArchive) PKG-00.pkg
|
122
|
+
13813 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
|
123
|
+
13813 INFO: Bootloader c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
|
124
|
+
13813 INFO: checking EXE
|
125
|
+
13813 INFO: Building EXE because EXE-00.toc is non existent
|
126
|
+
13813 INFO: Building EXE from EXE-00.toc
|
127
|
+
13813 INFO: Copying icons from ['c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\images\icon-console.ico']
|
128
|
+
13891 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
|
129
|
+
13891 INFO: Writing RT_ICON 1 resource with 3752 bytes
|
130
|
+
13891 INFO: Writing RT_ICON 2 resource with 2216 bytes
|
131
|
+
13891 INFO: Writing RT_ICON 3 resource with 1384 bytes
|
132
|
+
13891 INFO: Writing RT_ICON 4 resource with 37019 bytes
|
133
|
+
13891 INFO: Writing RT_ICON 5 resource with 9640 bytes
|
134
|
+
13891 INFO: Writing RT_ICON 6 resource with 4264 bytes
|
135
|
+
13891 INFO: Writing RT_ICON 7 resource with 1128 bytes
|
136
|
+
13907 INFO: Appending archive to EXE C:\Users\user\RPA\build\excel_test\excel_test.exe
|
137
|
+
13985 INFO: Building EXE from EXE-00.toc completed successfully.
|
138
|
+
13985 INFO: checking COLLECT
|
139
|
+
13985 INFO: Building COLLECT because COLLECT-00.toc is non existent
|
140
|
+
13985 INFO: Building COLLECT COLLECT-00.toc
|
141
|
+
14501 INFO: Building COLLECT COLLECT-00.toc completed successfully.
|
142
|
+
(base) PS C:\Users\user\RPA>
|
79
143
|
```
|
80
144
|
|
81
145
|
### 補足情報(環境)
|
@@ -83,137 +147,4 @@
|
|
83
147
|
OS:windows10 64bit
|
84
148
|
Python:3.8.3
|
85
149
|
pip:21.0.1
|
86
|
-
pyinstaller:4.2
|
150
|
+
pyinstaller:4.2
|
87
|
-
|
88
|
-
### 追記(ログ確認)
|
89
|
-
下記を参考にし、exe実行時のログを確認しました。
|
90
|
-
ログではエラー表記はなかったため、原因不明です。
|
91
|
-
|
92
|
-
https://ja.stackoverflow.com/questions/66359/pyinstaller%E3%81%A7exe%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%8C%96%E3%81%97%E3%81%9F%E3%81%8C%E5%8B%95%E4%BD%9C%E3%81%97%E3%81%AA%E3%81%84
|
93
|
-
|
94
|
-
↓ Pyinstaller実行時
|
95
|
-
|
96
|
-
```Python
|
97
|
-
(base) PS C:\Users\user> pyinstaller excel_test.ipynb --clean --debug all
|
98
|
-
2587 INFO: PyInstaller: 4.2
|
99
|
-
2587 INFO: Python: 3.8.3 (conda)
|
100
|
-
2587 INFO: Platform: Windows-10-10.0.19041-SP0
|
101
|
-
2588 INFO: wrote C:\Users\user\excel_test.spec
|
102
|
-
2597 INFO: UPX is not available.
|
103
|
-
2598 INFO: Removing temporary files and cleaning cache in C:\Users\user\AppData\Roaming\pyinstaller
|
104
|
-
2632 INFO: Extending PYTHONPATH with paths
|
105
|
-
['C:\Users\user', 'C:\Users\user']
|
106
|
-
2734 INFO: checking Analysis
|
107
|
-
2735 INFO: Building Analysis because Analysis-00.toc is non existent
|
108
|
-
2735 INFO: Initializing module dependency graph...
|
109
|
-
2750 INFO: Caching module graph hooks...
|
110
|
-
2764 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
|
111
|
-
2771 INFO: Analyzing base_library.zip ...
|
112
|
-
11106 INFO: Processing pre-find module path hook distutils from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
|
113
|
-
11113 INFO: distutils: retargeting to non-venv dir 'c:\users\user\anaconda3\lib'
|
114
|
-
17545 INFO: Caching module dependency graph...
|
115
|
-
17896 INFO: running Analysis Analysis-00.toc
|
116
|
-
17921 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
|
117
|
-
required by c:\users\user\anaconda3\python.exe
|
118
|
-
18371 INFO: Analyzing C:\Users\user\excel_test.ipynb
|
119
|
-
18379 INFO: Processing module hooks...
|
120
|
-
18380 INFO: Loading module hook 'hook-difflib.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
121
|
-
18381 INFO: Excluding import of doctest from module difflib
|
122
|
-
18381 INFO: Loading module hook 'hook-distutils.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
123
|
-
18384 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
124
|
-
18385 INFO: Excluding import of lib2to3.refactor from module distutils.util
|
125
|
-
18386 INFO: Loading module hook 'hook-encodings.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
126
|
-
18530 INFO: Loading module hook 'hook-heapq.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
127
|
-
18534 INFO: Excluding import of doctest from module heapq
|
128
|
-
18534 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
129
|
-
18597 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
130
|
-
18600 INFO: Excluding import of test.support from module multiprocessing.util
|
131
|
-
18600 INFO: Excluding import of test from module multiprocessing.util
|
132
|
-
18604 INFO: Loading module hook 'hook-pickle.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
133
|
-
18611 INFO: Excluding import of argparse from module pickle
|
134
|
-
18611 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
135
|
-
18613 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
136
|
-
18615 INFO: Loading module hook 'hook-xml.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
137
|
-
18888 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
138
|
-
19163 INFO: checking Tree
|
139
|
-
19164 INFO: Building Tree because Tree-00.toc is non existent
|
140
|
-
19165 INFO: Building Tree Tree-00.toc
|
141
|
-
19248 INFO: checking Tree
|
142
|
-
19255 INFO: Building Tree because Tree-01.toc is non existent
|
143
|
-
19256 INFO: Building Tree Tree-01.toc
|
144
|
-
19424 INFO: checking Tree
|
145
|
-
19425 INFO: Building Tree because Tree-02.toc is non existent
|
146
|
-
19429 INFO: Building Tree Tree-02.toc
|
147
|
-
19467 INFO: Looking for ctypes DLLs
|
148
|
-
19541 INFO: Analyzing run-time hooks ...
|
149
|
-
19550 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py'
|
150
|
-
19563 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_win32api.py'
|
151
|
-
19594 INFO: Looking for dynamic libraries
|
152
|
-
19916 INFO: Looking for eggs
|
153
|
-
19916 INFO: Using Python library c:\users\user\anaconda3\python38.dll
|
154
|
-
19921 INFO: Found binding redirects:
|
155
|
-
[]
|
156
|
-
20125 INFO: Warnings written to C:\Users\user\build\excel_test\warn-excel_test.txt
|
157
|
-
20231 INFO: Graph cross-reference written to C:\Users\user\build\excel_test\xref-excel_test.html
|
158
|
-
20251 INFO: checking PYZ
|
159
|
-
20251 INFO: Building PYZ because PYZ-00.toc is non existent
|
160
|
-
20251 INFO: Building PYZ (ZlibArchive) C:\Users\user\build\excel_test\PYZ-00.pyz
|
161
|
-
20253 INFO: Building PYZ (ZlibArchive) C:\Users\user\build\excel_test\PYZ-00.pyz completed successfully.
|
162
|
-
20266 INFO: checking PKG
|
163
|
-
20266 INFO: Building PKG because PKG-00.toc is non existent
|
164
|
-
20267 INFO: Building PKG (CArchive) PKG-00.pkg
|
165
|
-
20299 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
|
166
|
-
20303 INFO: Bootloader c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run_d.exe
|
167
|
-
20304 INFO: checking EXE
|
168
|
-
20308 INFO: Building EXE because EXE-00.toc is non existent
|
169
|
-
20311 INFO: Building EXE from EXE-00.toc
|
170
|
-
20316 INFO: Copying icons from ['c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\images\icon-console.ico']
|
171
|
-
20502 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
|
172
|
-
20503 INFO: Writing RT_ICON 1 resource with 3752 bytes
|
173
|
-
20504 INFO: Writing RT_ICON 2 resource with 2216 bytes
|
174
|
-
20510 INFO: Writing RT_ICON 3 resource with 1384 bytes
|
175
|
-
20513 INFO: Writing RT_ICON 4 resource with 37019 bytes
|
176
|
-
20513 INFO: Writing RT_ICON 5 resource with 9640 bytes
|
177
|
-
20514 INFO: Writing RT_ICON 6 resource with 4264 bytes
|
178
|
-
20515 INFO: Writing RT_ICON 7 resource with 1128 bytes
|
179
|
-
20519 INFO: Appending archive to EXE C:\Users\user\build\excel_test\excel_test.exe
|
180
|
-
20681 INFO: Building EXE from EXE-00.toc completed successfully.
|
181
|
-
20690 INFO: checking COLLECT
|
182
|
-
20691 INFO: Building COLLECT because COLLECT-00.toc is non existent
|
183
|
-
20692 INFO: Building COLLECT COLLECT-00.toc
|
184
|
-
24672 INFO: Building COLLECT COLLECT-00.toc completed successfully.
|
185
|
-
```
|
186
|
-
↓ exe実行時のログ(文字数の制限上途中は省略しています。)
|
187
|
-
|
188
|
-
```Python
|
189
|
-
Microsoft Windows [Version 10.0.19041.804]
|
190
|
-
(c) 2020 Microsoft Corporation. All rights reserved.
|
191
|
-
|
192
|
-
C:\Users\user>cd dist\excel_test
|
193
|
-
|
194
|
-
C:\Users\user\dist\excel_test>excel_test.exe
|
195
|
-
[11368] PyInstaller Bootloader 3.x
|
196
|
-
[11368] LOADER: executable is C:\Users\user\dist\excel_test\excel_test.exe
|
197
|
-
[11368] LOADER: homepath is C:\Users\user\dist\excel_test
|
198
|
-
[11368] LOADER: _MEIPASS2 is NULL
|
199
|
-
[11368] LOADER: archivename is C:\Users\user\dist\excel_test\excel_test.exe
|
200
|
-
[11368] LOADER: No need to extract files to run; setting extractionpath to homepath
|
201
|
-
[11368] LOADER: SetDllDirectory(C:\Users\user\dist\excel_test)
|
202
|
-
[11368] LOADER: Already in the child - running user's code.
|
203
|
-
[11368] LOADER: Python library: C:\Users\user\dist\excel_test\python38.dll
|
204
|
-
[11368] LOADER: Loaded functions from Python library.
|
205
|
-
[11368] LOADER: Manipulating environment (sys.path, sys.prefix)
|
206
|
-
[11368] LOADER: sys.prefix is C:\Users\user\dist\excel_test
|
207
|
-
[11368] LOADER: Pre-init sys.path is C:\Users\user\dist\excel_test\base_library.zip;C:\Users\user\dist\excel_test
|
208
|
-
[11368] LOADER: Setting runtime options
|
209
|
-
[11368] LOADER: Runtime option: v
|
210
|
-
[11368] LOADER: Initializing python
|
211
|
-
import _frozen_importlib # frozen
|
212
|
-
・
|
213
|
-
・
|
214
|
-
・
|
215
|
-
# destroy select
|
216
|
-
# destroy _frozen_importlib
|
217
|
-
|
218
|
-
C:\Users\user\dist\excel_test>
|
219
|
-
```
|
4
ログ追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -83,4 +83,137 @@
|
|
83
83
|
OS:windows10 64bit
|
84
84
|
Python:3.8.3
|
85
85
|
pip:21.0.1
|
86
|
-
pyinstaller:4.2
|
86
|
+
pyinstaller:4.2
|
87
|
+
|
88
|
+
### 追記(ログ確認)
|
89
|
+
下記を参考にし、exe実行時のログを確認しました。
|
90
|
+
ログではエラー表記はなかったため、原因不明です。
|
91
|
+
|
92
|
+
https://ja.stackoverflow.com/questions/66359/pyinstaller%E3%81%A7exe%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E5%8C%96%E3%81%97%E3%81%9F%E3%81%8C%E5%8B%95%E4%BD%9C%E3%81%97%E3%81%AA%E3%81%84
|
93
|
+
|
94
|
+
↓ Pyinstaller実行時
|
95
|
+
|
96
|
+
```Python
|
97
|
+
(base) PS C:\Users\user> pyinstaller excel_test.ipynb --clean --debug all
|
98
|
+
2587 INFO: PyInstaller: 4.2
|
99
|
+
2587 INFO: Python: 3.8.3 (conda)
|
100
|
+
2587 INFO: Platform: Windows-10-10.0.19041-SP0
|
101
|
+
2588 INFO: wrote C:\Users\user\excel_test.spec
|
102
|
+
2597 INFO: UPX is not available.
|
103
|
+
2598 INFO: Removing temporary files and cleaning cache in C:\Users\user\AppData\Roaming\pyinstaller
|
104
|
+
2632 INFO: Extending PYTHONPATH with paths
|
105
|
+
['C:\Users\user', 'C:\Users\user']
|
106
|
+
2734 INFO: checking Analysis
|
107
|
+
2735 INFO: Building Analysis because Analysis-00.toc is non existent
|
108
|
+
2735 INFO: Initializing module dependency graph...
|
109
|
+
2750 INFO: Caching module graph hooks...
|
110
|
+
2764 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
|
111
|
+
2771 INFO: Analyzing base_library.zip ...
|
112
|
+
11106 INFO: Processing pre-find module path hook distutils from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\pre_find_module_path\hook-distutils.py'.
|
113
|
+
11113 INFO: distutils: retargeting to non-venv dir 'c:\users\user\anaconda3\lib'
|
114
|
+
17545 INFO: Caching module dependency graph...
|
115
|
+
17896 INFO: running Analysis Analysis-00.toc
|
116
|
+
17921 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
|
117
|
+
required by c:\users\user\anaconda3\python.exe
|
118
|
+
18371 INFO: Analyzing C:\Users\user\excel_test.ipynb
|
119
|
+
18379 INFO: Processing module hooks...
|
120
|
+
18380 INFO: Loading module hook 'hook-difflib.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
121
|
+
18381 INFO: Excluding import of doctest from module difflib
|
122
|
+
18381 INFO: Loading module hook 'hook-distutils.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
123
|
+
18384 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
124
|
+
18385 INFO: Excluding import of lib2to3.refactor from module distutils.util
|
125
|
+
18386 INFO: Loading module hook 'hook-encodings.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
126
|
+
18530 INFO: Loading module hook 'hook-heapq.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
127
|
+
18534 INFO: Excluding import of doctest from module heapq
|
128
|
+
18534 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
129
|
+
18597 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
130
|
+
18600 INFO: Excluding import of test.support from module multiprocessing.util
|
131
|
+
18600 INFO: Excluding import of test from module multiprocessing.util
|
132
|
+
18604 INFO: Loading module hook 'hook-pickle.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
133
|
+
18611 INFO: Excluding import of argparse from module pickle
|
134
|
+
18611 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
135
|
+
18613 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
136
|
+
18615 INFO: Loading module hook 'hook-xml.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
137
|
+
18888 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks'...
|
138
|
+
19163 INFO: checking Tree
|
139
|
+
19164 INFO: Building Tree because Tree-00.toc is non existent
|
140
|
+
19165 INFO: Building Tree Tree-00.toc
|
141
|
+
19248 INFO: checking Tree
|
142
|
+
19255 INFO: Building Tree because Tree-01.toc is non existent
|
143
|
+
19256 INFO: Building Tree Tree-01.toc
|
144
|
+
19424 INFO: checking Tree
|
145
|
+
19425 INFO: Building Tree because Tree-02.toc is non existent
|
146
|
+
19429 INFO: Building Tree Tree-02.toc
|
147
|
+
19467 INFO: Looking for ctypes DLLs
|
148
|
+
19541 INFO: Analyzing run-time hooks ...
|
149
|
+
19550 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py'
|
150
|
+
19563 INFO: Including run-time hook 'c:\users\user\anaconda3\lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_win32api.py'
|
151
|
+
19594 INFO: Looking for dynamic libraries
|
152
|
+
19916 INFO: Looking for eggs
|
153
|
+
19916 INFO: Using Python library c:\users\user\anaconda3\python38.dll
|
154
|
+
19921 INFO: Found binding redirects:
|
155
|
+
[]
|
156
|
+
20125 INFO: Warnings written to C:\Users\user\build\excel_test\warn-excel_test.txt
|
157
|
+
20231 INFO: Graph cross-reference written to C:\Users\user\build\excel_test\xref-excel_test.html
|
158
|
+
20251 INFO: checking PYZ
|
159
|
+
20251 INFO: Building PYZ because PYZ-00.toc is non existent
|
160
|
+
20251 INFO: Building PYZ (ZlibArchive) C:\Users\user\build\excel_test\PYZ-00.pyz
|
161
|
+
20253 INFO: Building PYZ (ZlibArchive) C:\Users\user\build\excel_test\PYZ-00.pyz completed successfully.
|
162
|
+
20266 INFO: checking PKG
|
163
|
+
20266 INFO: Building PKG because PKG-00.toc is non existent
|
164
|
+
20267 INFO: Building PKG (CArchive) PKG-00.pkg
|
165
|
+
20299 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
|
166
|
+
20303 INFO: Bootloader c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run_d.exe
|
167
|
+
20304 INFO: checking EXE
|
168
|
+
20308 INFO: Building EXE because EXE-00.toc is non existent
|
169
|
+
20311 INFO: Building EXE from EXE-00.toc
|
170
|
+
20316 INFO: Copying icons from ['c:\users\user\anaconda3\lib\site-packages\PyInstaller\bootloader\images\icon-console.ico']
|
171
|
+
20502 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
|
172
|
+
20503 INFO: Writing RT_ICON 1 resource with 3752 bytes
|
173
|
+
20504 INFO: Writing RT_ICON 2 resource with 2216 bytes
|
174
|
+
20510 INFO: Writing RT_ICON 3 resource with 1384 bytes
|
175
|
+
20513 INFO: Writing RT_ICON 4 resource with 37019 bytes
|
176
|
+
20513 INFO: Writing RT_ICON 5 resource with 9640 bytes
|
177
|
+
20514 INFO: Writing RT_ICON 6 resource with 4264 bytes
|
178
|
+
20515 INFO: Writing RT_ICON 7 resource with 1128 bytes
|
179
|
+
20519 INFO: Appending archive to EXE C:\Users\user\build\excel_test\excel_test.exe
|
180
|
+
20681 INFO: Building EXE from EXE-00.toc completed successfully.
|
181
|
+
20690 INFO: checking COLLECT
|
182
|
+
20691 INFO: Building COLLECT because COLLECT-00.toc is non existent
|
183
|
+
20692 INFO: Building COLLECT COLLECT-00.toc
|
184
|
+
24672 INFO: Building COLLECT COLLECT-00.toc completed successfully.
|
185
|
+
```
|
186
|
+
↓ exe実行時のログ(文字数の制限上途中は省略しています。)
|
187
|
+
|
188
|
+
```Python
|
189
|
+
Microsoft Windows [Version 10.0.19041.804]
|
190
|
+
(c) 2020 Microsoft Corporation. All rights reserved.
|
191
|
+
|
192
|
+
C:\Users\user>cd dist\excel_test
|
193
|
+
|
194
|
+
C:\Users\user\dist\excel_test>excel_test.exe
|
195
|
+
[11368] PyInstaller Bootloader 3.x
|
196
|
+
[11368] LOADER: executable is C:\Users\user\dist\excel_test\excel_test.exe
|
197
|
+
[11368] LOADER: homepath is C:\Users\user\dist\excel_test
|
198
|
+
[11368] LOADER: _MEIPASS2 is NULL
|
199
|
+
[11368] LOADER: archivename is C:\Users\user\dist\excel_test\excel_test.exe
|
200
|
+
[11368] LOADER: No need to extract files to run; setting extractionpath to homepath
|
201
|
+
[11368] LOADER: SetDllDirectory(C:\Users\user\dist\excel_test)
|
202
|
+
[11368] LOADER: Already in the child - running user's code.
|
203
|
+
[11368] LOADER: Python library: C:\Users\user\dist\excel_test\python38.dll
|
204
|
+
[11368] LOADER: Loaded functions from Python library.
|
205
|
+
[11368] LOADER: Manipulating environment (sys.path, sys.prefix)
|
206
|
+
[11368] LOADER: sys.prefix is C:\Users\user\dist\excel_test
|
207
|
+
[11368] LOADER: Pre-init sys.path is C:\Users\user\dist\excel_test\base_library.zip;C:\Users\user\dist\excel_test
|
208
|
+
[11368] LOADER: Setting runtime options
|
209
|
+
[11368] LOADER: Runtime option: v
|
210
|
+
[11368] LOADER: Initializing python
|
211
|
+
import _frozen_importlib # frozen
|
212
|
+
・
|
213
|
+
・
|
214
|
+
・
|
215
|
+
# destroy select
|
216
|
+
# destroy _frozen_importlib
|
217
|
+
|
218
|
+
C:\Users\user\dist\excel_test>
|
219
|
+
```
|
3
表記変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
開いた後、何も動作しません。
|
5
5
|
(exeファイルを押すと、コマンドプロンプトのような真っ黒い画面が一瞬出て消える)
|
6
6
|
|
7
|
-
尚、
|
7
|
+
尚、Pythonのコードは下記通りで、ポップアップが表示されるのみのコードです。
|
8
8
|
|
9
9
|
```Python
|
10
10
|
import pyautogui as pgui
|
2
コード入力
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,9 +6,12 @@
|
|
6
6
|
|
7
7
|
尚、exeファイルの正常動作は下記のような簡単な動作になります。
|
8
8
|
|
9
|
+
```Python
|
9
|
-
|
10
|
+
import pyautogui as pgui
|
10
|
-
・excelでctrl+cを押す
|
11
11
|
|
12
|
+
pgui.alert('exe化テスト')
|
13
|
+
```
|
14
|
+
|
12
15
|
### 試したこと
|
13
16
|
- pyinstaller 実行方法変更
|
14
17
|
下記コードで --onefile --noconsoleを外しても共に
|
1
タグ追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|