I always include: import sys import os sys.path.append("PATH_TO_PYWIKIFOLDER") in all my scripts before I try to import wikipedia that should fix your issue
On Fri, May 17, 2013 at 6:29 PM, Alex Brollo <alex.bro...@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? > > Alex > > > > _______________________________________________ > Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) > https://lists.wikimedia.org/mailman/listinfo/toolserver-l > Posting guidelines for this list: > https://wiki.toolserver.org/view/Mailing_list_etiquette >
_______________________________________________ Toolserver-l mailing list (Toolserver-l@lists.wikimedia.org) https://lists.wikimedia.org/mailman/listinfo/toolserver-l Posting guidelines for this list: https://wiki.toolserver.org/view/Mailing_list_etiquette