mac PyCharm 运行python时不再提示跳出询问框

本文指导如何在Mac上通过Keychain Access创建一个自签名证书,用于代码签名。步骤包括打开Keychain Access,选择创建证书,设置为自签名根和代码签名类型,输入有效期,并签署应用程序。代码签署后,需要在弹出的权限对话框中允许,并解决OSX防火墙的相关提示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

转自:https://apple.stackexchange.com/a/383674/462194

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值