// remove undesired paths from PYTHONPATH and add ilastik"s submodules
pythonpath = [k for k in sys.path if k.startswith(ilastik_dir)]
for k in ["/ilastik/lazyflow", "/ilastik/volumina", "/ilastik/ilastik"]:
pythonpath.append(ilastik_dir + k.replace("/", os.path.sep))
sys.path = pythonpath
if sys.platform.startswith("win"):
// empty PATH except for gurobi and CPLEX and add ilastik"s installation paths
After Change
k.count("windows\\system32") > 0]
for k in ["/Qt4/bin", "/Library/bin", "/python", "/bin"]:
new_path = ilastik_dir + k.replace("/", os.path.sep)
if os.path.isdir(new_path):
path.append(new_path)
os.environ["PATH"] = os.pathsep.join(reversed(path))
else:
// clean LD_LIBRARY_PATH and add ilastik"s installation paths
// (gurobi and CPLEX are supposed to be located there as well)