I’m trying to use pyinstaller on a very simple python scripot which is only :
print ("Hello world")
The computer is a Macbook Air M3 with Mac OSX Sonoma 14.5. Python 3.11.9 and pyinstaller 6.7.0 are installed with conda 24.3.0.
I get :
> pyinstaller hello.py
234 INFO: PyInstaller: 6.7.0, contrib hooks: 2024.6
234 INFO: Python: 3.11.9 (conda)
295 INFO: Platform: macOS-14.5-arm64-arm-64bit
296 INFO: wrote /Users/marti/hello.spec
300 INFO: Extending PYTHONPATH with paths
['/Users/marti']
466 INFO: checking Analysis
469 INFO: checking PYZ
470 INFO: EXE target arch: arm64
470 INFO: Code signing identity: None
473 INFO: checking PKG
473 INFO: Bootloader /Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/bootloader/Darwin-64bit/run
473 INFO: checking EXE
473 INFO: Building EXE because EXE-00.toc is non existent
473 INFO: Building EXE from EXE-00.toc
473 INFO: Copying bootloader EXE to /Users/marti/build/hello/hello
474 INFO: Converting EXE to target arch (arm64)
474 INFO: Removing signature(s) from EXE
Traceback (most recent call last):
File "/Users/marti/miniforge3/envs/FULL/bin/pyinstaller", line 11, in <module>
sys.exit(run())
^^^^^
File "/Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/__main__.py", line 212, in run
run_build(pyi_config, spec_file, **vars(args))
File "/Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/__main__.py", line 69, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/building/build_main.py", line 1189, in main
build(specfile, distpath, workpath, clean_build)
File "/Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/building/build_main.py", line 1129, in build
exec(code, spec_namespace)
File "/Users/marti/hello.spec", line 19, in <module>
exe = EXE(
^^^^
File "/Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/building/api.py", line 643, in __init__
self.__postinit__()
File "/Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/building/datastruct.py", line 184, in __postinit__
self.assemble()
File "/Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/building/api.py", line 820, in assemble
osxutils.remove_signature_from_binary(build_name)
File "/Users/marti/miniforge3/envs/FULL/lib/python3.11/site-packages/PyInstaller/utils/osx.py", line 365, in remove_signature_from_binary
raise SystemError(f"codesign command ({cmd_args}) failed with error code {p.returncode}!noutput: {p.stdout}")
SystemError: codesign command (['codesign', '--remove', '--all-architectures', '/Users/marti/build/hello/hello']) failed with error code 106!
output: --sign is required
Run with --help for more information.
I can not find any hint about this problem.
Help will be highly appreciated.
Olivier