State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:4.0v5|BugID:476167|
├─ printSysPath.py
└─ sitecustomize_dir
└─ sitecustomize.py
import sys
print("sys.path inside the python process:")
for index, path in enumerate(sys.path, start=1):
print(" {0:02d} {1}".format(index, path))
import sys
sys.path = ["/PATH/FIRST"] + sys.path[:]
print("sys.path after sitecustomize was called:")
for index, path in enumerate(sys.path, start=1):
print(" {0:02d} {1}".format(index, path))
/tmp/katana_test and set the PYTHONPATH:export PYTHONPATH=$(pwd)/sitecustomize_dir:/PATH/SECOND
$KATANA_4_0_2/katanaBin --script ./printSysPath.py
[INFO MAIN]: Launching Katana 4.0v1 script...
[INFO MAIN]: Crash handling is disabled.
[INFO MAIN]: Attempting to acquire Render license...
sys.path after sitecustomize was called:
01 /PATH/FIRST
02 /tmp/katana_test/sitecustomize_dir
03 /PATH/SECOND
04 /opt/Katana4.0v1/bin/python2.7/lib/python27.zip
05 /opt/Katana4.0v1/bin/python2.7/lib/python2.7
06 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/plat-linux2
07 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/lib-tk
08 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/lib-old
09 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/lib-dynload
10 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/site-packages
[INFO python.Main]: KATANA_RENDER_TILE_SIZE defaulting to 256x256.
[INFO python.Main]: KATANA_IMAGE_MEMORY defaulting to 22381 MB.
[INFO python.Main]: KATANA_IMAGE_DISK_MEMORY defaulting to 129580 MB.
[INFO python.Main]: KATANA_SPEC_CACHE_ENABLED defaulting to 1.
[WARN python.Main]: There are no valid Renderer plug-ins available.
[INFO python.FarmAPI.FarmPluginManager]: Enabled concurrent render jobs.
sys.path inside the python process:
01 /opt/Katana4.0v1/bin/python2.7
02 /opt/Katana4.0v1/bin/python2.7/lib/python2.7
03 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/lib-tk
04 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/plat-linux2
05 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/lib-dynload
06 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/site-packages
07 /opt/Katana4.0v1/bin
08 /opt/Katana4.0v1/bin/python
09 /opt/Katana4.0v1/bin/python/python_katana
10 /opt/Katana4.0v1/bin/python/Main
11 /opt/Katana4.0v1
12 /PATH/FIRST
13 /tmp/katana_test/sitecustomize_dir
14 /PATH/SECOND
15 /opt/Katana4.0v1/bin/python2.7/lib/python27.zip
16 /opt/Katana4.0v1/bin/python2.7/lib/python2.7/lib-old
17 /opt/Katana4.0v1/plugins/Resources/Core/Plugins
Notice /PATH/FIRST is before /PATH/SECOND.[INFO MAIN]: Launching Katana 4.0v2 script...
[INFO MAIN]: Crash handling is disabled.
[INFO MAIN]: Attempting to acquire Render license...
sys.path after sitecustomize was called:
01 /PATH/FIRST
02 /tmp/katana_test/sitecustomize_dir
03 /PATH/SECOND
04 /opt/Katana4.0v2/bin/python2.7/lib/python27.zip
05 /opt/Katana4.0v2/bin/python2.7/lib/python2.7
06 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/plat-linux2
07 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/lib-tk
08 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/lib-old
09 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/lib-dynload
10 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/site-packages
[INFO python.Main]: KATANA_RENDER_TILE_SIZE defaulting to 256x256.
[INFO python.Main]: KATANA_IMAGE_MEMORY defaulting to 22381 MB.
[INFO python.Main]: KATANA_IMAGE_DISK_MEMORY defaulting to 129580 MB.
[INFO python.Main]: KATANA_SPEC_CACHE_ENABLED defaulting to 1.
[WARN python.Main]: There are no valid Renderer plug-ins available.
[INFO python.FarmAPI.FarmPluginManager]: Enabled concurrent render jobs.
sys.path inside the python process:
01 /opt/Katana4.0v2/bin/python2.7
02 /opt/Katana4.0v2/bin/python2.7/lib/python2.7
03 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/lib-tk
04 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/plat-linux2
05 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/lib-dynload
06 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/site-packages
07 /opt/Katana4.0v2/bin
08 /opt/Katana4.0v2/bin/python
09 /opt/Katana4.0v2/bin/python/python_katana
10 /opt/Katana4.0v2/bin/python/Main
11 /opt/Katana4.0v2/plugins/Resources/Core/Plugins
12 /opt/Katana4.0v2
13 /tmp/katana_test/sitecustomize_dir
14 /PATH/SECOND
15 /PATH/FIRST
16 /opt/Katana4.0v2/bin/python2.7/lib/python27.zip
17 /opt/Katana4.0v2/bin/python2.7/lib/python2.7/lib-old
Notice how the order have changed and /PATH/SECOND is now BEFORE /PATH/FIRST.We're sorry to hear that
Please tell us why