Pyinstaller が app を作成できない
Q&A
Closed
解決したいこと
Pythonのtkinterを使用したプログラムを、pyinstallerでアプリケーション化しようとしたところ、エラーが発生しました。
解決方法を教えていただきたいです。
環境
- MacOS 10.12.6 Sierra
- Python 3.10.6
- pyinstaller 5.5
発生している問題・エラー
$ pyinstaller test.py --onefile --noconsole --distpath DIR
...
(中略)
...
11888 INFO: Appending PKG archive to EXE
11905 INFO: Fixing EXE headers for code signing
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/pyinstaller", line 8, in <module>
sys.exit(run())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyInstaller/__main__.py", line 179, in run
run_build(pyi_config, spec_file, **vars(args))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyInstaller/__main__.py", line 60, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 963, in main
build(specfile, distpath, workpath, clean_build)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 885, in build
exec(code, spec_namespace)
File "/~(中略)/test.spec", line 24, in <module>
exe = EXE(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyInstaller/building/api.py", line 545, in __init__
self.__postinit__()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyInstaller/building/datastruct.py", line 173, in __postinit__
self.assemble()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyInstaller/building/api.py", line 776, in assemble
osxutils.fix_exe_for_code_signing(build_name)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyInstaller/utils/osx.py", line 179, in fix_exe_for_code_signing
assert len(sign_sec) == 0, "Executable contains code signature!"
AssertionError: Executable contains code signature!
ご意見・アドバイス等、よろしくお願いいたします。