ImportError no module named site

963 views
Skip to first unread message

Pavel Hančar

unread,
May 16, 2013, 11:26:34 AM5/16/13
to disc...@googlegroups.com
 Worker died. Last words:
ImportError: No module named site

Please, what and how runs the python on the slaves? I have nodes with an old version of python and there I run the new python from a non-standart directory. When I login through ssh and write python -c "import site"; python works well. But when running the disco job, it fails with the error.
  It's probably because there is no PYTHONPATH or PYTHONHOME set. I have it in my .bashrc, but it's not enough for disco.

Pavel Hančar

Jared Flatow

unread,
May 16, 2013, 11:36:33 AM5/16/13
to disc...@googlegroups.com
You need it to work for non-interactive login, what happens when you do 'ssh HOST python -c "import site"' as one command?

--
You received this message because you are subscribed to the Google Groups "Disco-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to disco-dev+...@googlegroups.com.
To post to this group, send email to disc...@googlegroups.com.
Visit this group at http://groups.google.com/group/disco-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pavel Hančar

unread,
May 16, 2013, 11:46:46 AM5/16/13
to disc...@googlegroups.com
It works well.


2013/5/16 Jared Flatow <jfl...@gmail.com>

Jared Flatow

unread,
May 16, 2013, 11:56:14 AM5/16/13
to disc...@googlegroups.com
On second thought, sounds like a broken python install - site should always be on the system path. The disco worker should be using /usr/bin/env python. To debug, you could import sys and print sys.path, and compare (and check python versions).

Pavel Hančar

unread,
May 16, 2013, 12:18:54 PM5/16/13
to disc...@googlegroups.com
Strange, when log in with my .bashrc I run python 2.7.3 and import site works well. When I login without the .bashrc, I run python 2.6.6 and import site works also well. Only disco mix it somehow.


2013/5/16 Jared Flatow <jfl...@gmail.com>

Pavel Hančar

unread,
May 18, 2013, 6:46:06 AM5/18/13
to disc...@googlegroups.com
 And suddenly it works :),
last thing I tried was to set the PATH variable in .bashrc this way:
PATH=/path/to/python-2.7.3/:$PATH:/path/to/python-2.7.3
 Then I restarted disco and it started to work. It seemed to me, disco reverses os.path variable somehow. But then I tried to turn back by setting PATH=/path/to/python-2.7.3/:$PATH and restarting disco and it continues working :)


2013/5/16 Pavel Hančar <pavel....@gmail.com>
Reply all
Reply to author
Forward
0 new messages