2

I am running a Python programme on my MacBook Pro (Catalina), but everytime it prompts the following information

enter image description here

However, in the pane of Security & Privacy preferences, I have set it,

enter image description here

How can I fix it?

1 Answers1

3

Create a self-signed certificate.

  1. Open Keychain Access. Applications > Utilities > Keychain Access.
  2. Keychain Access menu > Certificate Assistant > Create a Certificate...
  3. Enter a name like "My Certificate".
  4. Select Identity Type: Self Signed Root
  5. Select Certificate Type: Code Signing
  6. Check the Let me override defaults box
  7. Click Continue
  8. Enter a unique Serial Number
  9. Enter 7300 for the Validity Period.
  10. Click Continue
  11. Click Continue for the rest of the dialogs

Now sign your application

codesign -s "My Certificate" -f $(which python)

In the dialog that appears, click "Allow".

With the OS X firewall enabled, you can remove the "Do you want the application "python" to accept incoming network connections?" message.

Udhy
  • 6,697
  • Thanks, when running the command above, it prompts a window to input the keychain password, I do not know what is it. https://apple.stackexchange.com/questions/124591/osx-is-repeatedly-asking-for-login-keychain-password – GoingMyWay Mar 05 '20 at 16:23