0

我有一个启动程序,它每 10 秒使用 /usr/bin/python3 运行一个 python 文件。这是调用launchctl list我的 plist 的输出:

{
    "LimitLoadToSessionType" = "Aqua";
    "Label" = "com.bob.weather";
    "OnDemand" = false;
    "LastExitStatus" = 256;
    "Program" = "/usr/bin/python3";
    "ProgramArguments" = (
        "/usr/bin/python3";
        "/Users/bob/Dev/OpenTheWindow/weather.py";
    );
};

我的代码在手动执行时工作正常。

当我检查控制台时,它显示Service exited with abnormal code: 1. 它仅在我有requests进口商品时发生。其他模块——<code>json 和subprocess——可以很好地导入。我认为这是因为requests是用 pip 安装的。我应该怎么做才能requests被认可?

4

0 回答 0