I've created a simple python script to help automate a few things around my workplace. I'd like to share this with my coworkers, so I've used pyinstaller to create an executable.
Unfortunately, whenever one of my coworkers attempts to run this exec they get the following error
python not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
We all use macOS Monterey (have to per IT)
I did find a guide from pyinstaller to assist with code signing so this can be used with Mac:
That walked me through creating a self-signed certificate, but I'm getting the above error.
My steps are:
- Create certificate with Keychain Access >> Certificate Assistant >> Create a Certificate
- Choose
- a. Name: "Self Signed Developer"
- b. Identity type "Self Signed"
- c. Certificate Type: "Code Signing"
- Run `pyinstaller -Fn nameofapp --codesign-identity "Self Signed Developer" nameofapp.py
Which completes and successfully makes an executable. But, as the error states, does not include a Team name:
codesign -dv dist/nameofapp
Returns:
TeamIdentifier= not set
Am I able to set a Team Identifier for my app? Is distributing a self-signed app to my workplace even possible on Monterey or does Apple's security practices prohibit this?
Thank you!