Alex Brollo <alex.brollo(a)gmail.com> wrote:
As I told, I'm driving a pywikipedia bot (Alebot)
into willow; I installed
pywikipedia at $HOME, I set
PYTHONPATH=/home/alebot/pywikipedia [,.....]
into .environment file, and I am reviewing at my best
python scripts to run
them by qsub/qcronsub.
Most of my scripts obviously need a statement:
import wikipedia [,.....]
My questions:
1. Do I really need to install pywikipedia into $HOME?
2. My scripts run happily outside SGE, but when I try to run them under SGE
I get an error:
ImportError: No module named wikipedia
I didn't find doc for this ImportError (I suppose,
PYTHONPATH is wrong).
Where am I going wrong?
If your job is executed on Linux hosts, ~/.environment isn't
honoured (cf.
https://jira.toolserver.org/browse/TS-1472).
So at the moment it's best to follow John's advice and set
sys.path in Python (or use a wrapper shell script), or use
"-l arch=sol" to require that your job is executed on a So-
laris host.
Tim