python on a cray xt5, ImportError: No module named site

Burlen Loring bloring at lbl.gov
Mon Feb 21 17:53:12 EST 2011


Hi,

Got some trouble running python on a Cray XT5 which has a reduced os on 
the compute nodes, and you're supposed to link everything statically. I 
configured the build with --disable-shared and uncommented the modules 
in Modules/Setup which made sense (nearly all of them), and built with 
Cray's compiler wrappers. I set PYTHONHOME to point to the install.

I am able to run the build fine on the login nodes but when I run on the 
compute nodes I get the error:

"ImportError: No module named site".

Full output from -v pasted below. site.py is present. I tried running 
with -S, and the got "ImportError: No module named os", again os is 
present. When I commented out the os stuff and ran with -S and just 
printed sys.path it worked.

I'm not sure what the problem is. Can any one shed some light on what's 
going on here??

Thanks
Burlen

krakenpf5:/lustre/scratch/bloring$aprun -n 1 python -v ./test.py
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
ImportError: No module named site
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] zipimport
# cleanup[1] signal
# cleanup[1] exceptions
# cleanup[1] _warnings
# cleanup sys
# cleanup __builtin__
# cleanup ints: 5 unfreed ints
# cleanup floats
Application 5091634 exit codes: 1
Application 5091634 resources: utime 0, stime 0

#------------test.py---------------
import sys
#import os
print sys.path
#print "Hello from %d"%(os.getpid())
#------------------------------------



More information about the Python-list mailing list