Slicer 4.10 not starting after fresh build


I just build Slicer 4.10 with Qt5 and VTK8 from source on a linux machine (Linux Mint 19). The problem is that Slicer does not start and throws this message:

qt5ct: using qt5ct plugin
error: [/home/christian/builds/Slicer-4.10.0-build/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.

If I run Slicer with the gdb flag I got the following message:

./Slicer-build/Slicer --gdb
Fatal Python error: Py_Initialize: Unable to get the locale encoding
  File "/home/christian/builds/Slicer-4.10.0-build/python-install/lib/python2.7/encodings/", line 123
    raise CodecRegistryError,\
SyntaxError: invalid syntax

Current thread 0x00007f1fbeb25f80 (most recent call first):
error: [/usr/bin/gdb] exit abnormally - Report the problem.

So I guess something went wrong with the python installation. Unfortunatly I have no idea how to solve that problem. It would be great if you can help me.

Starting up with gdb is the right approach, and yes, you want to use the launcher for that if you can but there can be conflicts between gdb’s python and the environment Slicer needs to start up. Refer to this documentation.

In this case the SyntaxError in the encodings file is odd - maybe you can try patching around that and then retrying?

This error reported to occur when Slicer’s embeded Python environment is mixed with some other Python environments. See this post for details: python-real different from python interpreter - #2 by jcfr. @pieper’s suggestion above should fix the gdb launching issue and then hopefully you can find the root cause of the crash.

Hi Christian,

Instead of starting Slicer with gdb, I suggest you attached the debugger. See

Alternatively, you could also debug the Qt plugin loading setting up the environment variable QT_DEBUG_PLUGINS:



Thanks for all the quick responses. I will try on Wednesday.