问题描述
我有一个launchd,它每10 秒使用/usr/bin/python3 运行一个python 文件。这是在我的 plist 上调用 launchctl list
的输出:
{
"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
时发生。其他模块 - json
和 subprocess
- 可以很好地导入。我认为这是因为 requests
是用 pip 安装的。
我应该怎么做才能让 requests
被识别?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)