[vtkusers] Fatal Python error: PyThreadState_Get: no current thread

Jayson Kempinger jkempinger at decisionvis.com
Fri Apr 7 16:26:37 EDT 2017


Hi, I’m trying to install VTK on an iMac running 10.12.  I’m using python 3.5.2, compiled from source, and am compiling VTK-7.1.1 from source.

When I run python3 (with -v and -d) and try to import vtk python crashes with the following error:

>>> import vtk
# /Users/username/build/lib/python3.5/site-packages/vtk/__pycache__/__init__.cpython-35.pyc matches /Users/username/build/lib/python3.5/site-packages/vtk/__init__.py
# code object from '/Users/username/build/lib/python3.5/site-packages/vtk/__pycache__/__init__.cpython-35.pyc'
# /Users/username/build/lib/python3.5/__pycache__/__future__.cpython-35.pyc matches /Users/username/build/lib/python3.5/__future__.py
# code object from '/Users/username/build/lib/python3.5/__pycache__/__future__.cpython-35.pyc'
import '__future__' # <_frozen_importlib_external.SourceFileLoader object at 0x1073032e8>
# /Users/username/build/lib/python3.5/site-packages/vtk/__pycache__/vtkCommonCore.cpython-35.pyc matches /Users/username/build/lib/python3.5/site-packages/vtk/vtkCommonCore.py
# code object from '/Users/username/build/lib/python3.5/site-packages/vtk/__pycache__/vtkCommonCore.cpython-35.pyc'
Fatal Python error: PyThreadState_Get: no current thread
zsh: abort      python3 -v -d

From what I’ve read online it sounds like this is due to a python mismatch, i.e. building VTK against a different python version than the version it is run under.  I’ve searched through the advanced cmake configuration and can’t find any reference to the system built-in python2 interpreter.

Any suggestions on what might be going wrong?

Thanks!
Jayson


More information about the vtkusers mailing list