From df8207747a0fa9f00a90f515de31a3946b83eab9 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Mon, 18 Apr 2016 14:41:50 -0400 Subject: [PATCH] Force PYTHONPATH to be in the top of the sys.path list. This fixes https://github.com/Ultimaker/Cura/issues/704 --- cura_app.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cura_app.py b/cura_app.py index 853edabd5e..796ecd96a9 100755 --- a/cura_app.py +++ b/cura_app.py @@ -5,6 +5,15 @@ import sys +# It looks like setuptools creates a .pth file in +# the default /usr/lib which causes the default site-packages +# to be inserted into sys.path before PYTHONPATH. +# This can cause issues such as having libsip loaded from +# the system instead of the one provided with Cura, which causes +# incompatibility issues with libArcus +sys.path.insert(1, os.environ.get('PYTHONPATH', '')) + + def exceptHook(hook_type, value, traceback): import cura.CrashHandler cura.CrashHandler.show(hook_type, value, traceback)