diff --git a/cura_app.py b/cura_app.py index a2b29c92af..3561a3b06e 100755 --- a/cura_app.py +++ b/cura_app.py @@ -14,9 +14,10 @@ import sys # the system instead of the one provided with Cura, which causes # incompatibility issues with libArcus if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used - if sys.path[1] != os.environ["PYTHONPATH"]: # .. check whether PYTHONPATH is placed incorrectly. - sys.path.remove(os.environ["PYTHONPATH"]) # If so, remove that element.. - sys.path.insert(1, os.environ['PYTHONPATH']) # and add it at the correct place again. + PYTHONPATH_real = os.path.realpath(os.environ["PYTHONPATH"]) + if sys.path[1] != PYTHONPATH_real: # .. check whether PYTHONPATH is placed incorrectly. + sys.path.remove(PYTHONPATH_real) # If so, remove that element.. + sys.path.insert(1, PYTHONPATH_real) # and add it at the correct place again. def exceptHook(hook_type, value, traceback):