I was previously running Python 3.7 from MacPorts with Pyinstaller 4.0 from pypi and this was working fine. But after reading about Tkinter and Cocoa, I decided to wipe that away and install Python 3.7 from
python.org instead. Now Pyinstaller isn't working. This is probably due to some configuration issue with my paths, but I would appreciate any advice. I've removed all references to MacPorts Python that I can think of.
Inside a new venv I run
I make a very simple python script called bonk.py with just a single print statement. Pyinstaller packages with no errors in onedir mode. Here is the error when I try to run it:
$ ./dist/bonk/bonk
[2616] Error loading Python lib '/Users/elliott/source/test1/dist/bonk/Python': dlopen: dlopen(/Users/elliott/source/test1/dist/bonk/Python, 10): no suitable image found. Did find:
/Users/elliott/source/test1/dist/bonk/Python: code signature invalid for '/Users/elliott/source/test1/dist/bonk/Python'
There seems to be something wrong with the binary:
$ ./dist/bonk/Python
-bash: ./dist/bonk/Python: cannot execute binary file
Some more details:
$ which python
/Users/elliott/source/test1/env/bin/python
$ python --version
Python 3.7.9