I have a launchd that runs a python file using /usr/bin/python3 every 10 seconds. Here is the output of calling launchctl list
on my 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";
);
};
My code works fine when manually executing.
When I check Console, it says Service exited with abnormal code: 1
. It only occurs when I have requests
in my imports. The other modules—json
and subprocess
—can be imported fine. I think it's because requests
is installed with pip.
What should I do to make requests
be recognized?