Tom Insam

Stop my OS X firewall complaining about a virtualenv python

No matter how many times I click “allow” on this dialog, it still comes back. This is because my python binary is badly signed (I assume something in the virtualenv builder mangles it).

$ codesign -vvvv venv/bin/python
venv/bin/python: invalid signature (code or signature have been modified)
In architecture: i386

I can fix this by signing it myself (I have a developer account. Maybe you can use self-signed certificates? Pass).

$ codesign -f -s "iPhone Developer: Tom Insam" venv/bin/python
venv/bin/python: replacing existing signature

And now the firewall “allow” button will stick.