Skip to content

Python 3.7 has changed initialization, causing vtkpython to fail

Running vtkpython fails with the following error when it calls Py_Main():

Fatal Python error: _Py_InitializeCore: main interpreter already initialized

This error occurs because Py_InitializeEx() was called before Py_Main(), which is not allowed in Python 3.7.0 (but will be allowed in 3.7.1).

The following Python bug report states that it is a regression in 3.7.0 that was not caught prior to release:

https://bugs.python.org/issue34008

Edited by David Gobbi