I've got a Python script that I want to be started on boot. Putting a command in rc.local attempts to run the script, but fails because the script can't find the libraries on which it depends. These libraries are in a non-standard location. Normally, this isn't a problem because I specify these locations by setting up the PYTHONPATH environment variable in /etc/environment.
I tried specifying PYTHONPATH in rc.local (a non-optimal solution anyway because I'd like to specify it system-wide for all users in one place, ie, /etc/environment) which partly cures the problem. But it's still failing for one library (Quick2Wire) where the included file is in a sub-dir. PYTHONPATH includes the path:
The actualy include file is:
Normally, Python has no problem knowing it needs to look in the quick2wire sub-dir.
I guess I can setup a special version of PYTHONPATH in rc.local just to get this script to run and then have the version in /etc/environment replace it. Just wondered if there's a more elegant solution.