osx mountain lion - Running Python Script with Launchd: imports not found -
I try to set a script to run a python program at regular intervals using I am running OSX, 10.8.3 Related threads: Update: < / P> It seems that I can run the following command: and the script will be executed successfully. So, to modify my question: Use the You can define the default environment variable for editing This is the one that you want: Update: laund Python program fails because it can not import my-- I know this because I have caught errors in the log file. To solve this problem, I made
~ \ .macosx \ environment.plist , and duplicated my
PYTHONPATH , logged out and logged in again. It seems to be inadequate to solve the problem, and I'm trying something else.
Launchat Satellite PythonPath $ Pethon Path
~ \ .launchd.conf and
\ etc.launchd.conf , and did not exist.
laund gets it?
environment key key in the job definition To create a specific job environment:
launcher (8)
/etc/launchd.conf for services or
For Agent /etc/launchd-user.conf The latter works but does not have a document. Currently configuring (but unsupported) config file per user
$ HOME / .launchd.conf .
setenv PYTHONPATH / your / dragon / path in the config file
launctl (1) / Code>
/ etc / Launchd.conf is not supported in Mac OS X 10.10 and higher. On these systems, you have to define environment variables on a per-job basis.
Comments
Post a Comment