1

I've learned elsewhere on Stack Exchange that Apple has removed the formerly preferred way to set environment variables, /etc/launchd.conf, from OS X Yosemite. The Apple rep I linked to and others advise creating a launch agent to set the environment variables. My problem is that I run a number of Python scripts from launchd and I need to set the PYTHONPATH environment variable for them. The launch agent approach lets me set PYTHONPATH for most of what I run, but the change does not seem to percolate into jobs that are run straight from launchd. I have a lot of these jobs, so I don't want to have to set the environment variable I need in the launch agent for each. Is there a way I can make the environment variable change deeply enough that even stuff run from launchd itself picks up the change?

My current workaround is to use a .pth file but that only works for Python.

Community
  • 1
  • 1
kuzzooroo
  • 6,788
  • 11
  • 46
  • 84
  • I don't suppose you ever found a solution to this? It's still a pain in my ass at the moment. – deong Jan 23 '15 at 15:15

0 Answers0