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 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.

I am running OSX, 10.8.3

Related threads:

  • (Not applicable - my script indicates right python example)

    Update: < / P>

    It seems that I can run the following command:

      Launchat Satellite PythonPath $ Pethon Path   

    and the script will be executed successfully. So, to modify my question:

    1. Where is it stored? I examined ~ \ .launchd.conf and \ etc.launchd.conf , and did not exist.
    2. It's possible that when I reboot this setting is dumped. Where can I change this information so that laund gets it?

      Use the environment key key in the job definition To create a specific job environment:

          

      You can define the default environment variable for editing 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 .

      This is the one that you want:

        setenv PYTHONPATH / your / dragon / path  in the config file  launctl (1)  / Code>  

      Update: / 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

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -