Fatal Python error: Py_Initialize: unable to load the file system codec

Hello everyone,

I have downloaded and built 3DSlicer. However, I am now running into these runtime errors:

[SSL] Failed to load Slicer.crt
Fatal Python error: Py_Initialize: unable to load the file system codec

Visual Studio tells me it’s occurring from this line:

PythonQt::init(flags);

So I thought I needed to download PythonQt but it did not help. Does anyone know why these errors could be happening?

Most likely you have some other Python in your path and/or you did not start Visual Studio with Slicer.exe --VisualStudio.