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
As I told, I'm driving a pywikipedia bot (Alebot) into willow; I installed pywikipedia at $HOME, I setPYTHONPATH=/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 wikipediaI 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