RAM:test.py:
import runpy
if __name__ == "__main__":
print "Hello"
Ensure there is no value set for PYTHONPATH at the moment:
getenv PYTHONPATH
# should result in nothing
Execute the script:
python test.py
# "Hello"
Set PYTHONPATH:
setenv PYTHONPATH workbench:
# or any location
Ensure that it has been set:
getenv PYTHONPATH
# workbench:
Execute the script:
python test.py
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "test.py", line 1, in <module>
import runpy
ImportError: No module named runpy
Try also in "sh" - the same issue.
I report this because on OS4Depot it is version 2.4.1, but somehow I have 2.5.6 and I cannot remember where I got that from. I am not sure if 2.5.6 was meant to be more mature than 2.4.1 or whether this is a known issue.
PYTHONPATH is meant to extend - not replace - the searchables.