[vtkusers] vtkRenderingFreeTypePython: ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

Marco Masciola marco.masciola at gmail.com
Sat May 11 13:44:38 EDT 2019


Hi VTK Users and Developers,

I recently installed VTK 8.2.0 with Python wrappings on my Windows machine,
and am finding an error when importing VTK with the error message below.
The errors seems to be related to DLL initialization errors on the
vtkRenderingFreeTypePython side. Has anyone encountered this before? Even
further below, I posted the relevant parts of my CMackCache related to
building the python wrappings. I'm on Windows 7 and compiling with Visual
Studio 7. My VTK is Qt enabled.

Cheers,

>>> import vtk
Traceback (most recent call last):
  File
"C:\vtk\bin\bin\Release\Lib\site-packages\vtkmodules\vtkRenderingFreeType.py",
line 5, in <module>
    from .vtkRenderingFreeTypePython import *
ImportError: DLL load failed: A dynamic link library (DLL) initialization
routine failed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\vtk\bin\bin\Release\Lib\site-packages\vtk.py", line 32, in
<module>
    all_spec.loader.exec_module(all_m)
  File "C:\vtk\bin\bin\Release\Lib\site-packages\vtkmodules\all.py", line
26, in <module>
    from .vtkRenderingFreeType import *
  File
"C:\vtk\bin\bin\Release\Lib\site-packages\vtkmodules\vtkRenderingFreeType.py",
line 9, in <module>
    from vtkRenderingFreeTypePython import *
ImportError: DLL load failed: A dynamic link library (DLL) initialization
routine failed.



CMakeCache:

//Build examples.
BUILD_EXAMPLES:BOOL=ON
//Build with shared libraries.
BUILD_SHARED_LIBS:BOOL=ON
//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=/MTd /Zi /Ob0 /Od /RTC1
//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=/MT /O1 /Ob1 /DNDEBUG
//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=/MT /O2 /Ob2 /DNDEBUG
//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MT /Zi /O2 /Ob1 /DNDEBUG
//Request building vtkWebPython
Module_vtkWebPython:BOOL=OFF
//Request building vtkWrappingPythonCore
Module_vtkWrappingPythonCore:BOOL=ON
//Path to a library.
PYTHON_DEBUG_LIBRARY:FILEPATH=PYTHON_DEBUG_LIBRARY-NOTFOUND
//Path to a program.
PYTHON_EXECUTABLE:FILEPATH=C:/Users/marco/AppData/Local/Programs/Python/Python37/python.exe
//Path to a file.
PYTHON_INCLUDE_DIR:PATH=C:/Users/marco/AppData/Local/Programs/Python/Python37/include
//Path to a library.
PYTHON_LIBRARY:FILEPATH=C:/Users/marco/AppData/Local/Programs/Python/Python37/libs/python37.lib
//Wrap classes into the Python interpreted language.
VTKMY_WRAP_PYTHON:BOOL=ON
//Enable vtkpython and pvtkpython binaries
VTK_ENABLE_VTKPYTHON:BOOL=ON
//Python version to use
VTK_PYTHON_VERSION:STRING=3.7
//Should VTK Python wrapping be built?
VTK_WRAP_PYTHON:BOOL=ON
//Details about finding PythonInterp
FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[C:/Users/marco/AppData/Local/Programs/Python/Python37/python.exe][v3.7.3()]
//Details about finding PythonLibs
FIND_PACKAGE_MESSAGE_DETAILS_PythonLibs:INTERNAL=[C:/Users/marco/AppData/Local/Programs/Python/Python37/libs/python37.lib][C:/Users/marco/AppData/Local/Programs/Python/Python37/include][v()]
//ADVANCED property for variable: Module_vtkFiltersPython
Module_vtkFiltersPython-ADVANCED:INTERNAL=1
//Request building vtkFiltersPython
//ADVANCED property for variable: Module_vtkPython
Module_vtkPython-ADVANCED:INTERNAL=1
//Request building vtkPython
Module_vtkPython:INTERNAL=OFF
//ADVANCED property for variable: Module_vtkPythonContext2D
Module_vtkPythonContext2D-ADVANCED:INTERNAL=1
//Request building vtkPythonContext2D
Module_vtkPythonContext2D:INTERNAL=OFF
//ADVANCED property for variable: Module_vtkPythonInterpreter
Module_vtkPythonInterpreter-ADVANCED:INTERNAL=1
//Request building vtkPythonInterpreter
Module_vtkPythonInterpreter:INTERNAL=OFF
//ADVANCED property for variable: Module_vtkWebPython
Module_vtkWebPython-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Module_vtkWrappingPythonCore
Module_vtkWrappingPythonCore-ADVANCED:INTERNAL=1
//ADVANCED property for variable: Module_vtkfreetype
Module_vtkfreetype-ADVANCED:INTERNAL=1
//Request building vtkfreetype
Module_vtkfreetype:INTERNAL=OFF
//ADVANCED property for variable: PYTHON_DEBUG_LIBRARY
PYTHON_DEBUG_LIBRARY-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_EXECUTABLE
PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_INCLUDE_DIR
PYTHON_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: PYTHON_LIBRARY
PYTHON_LIBRARY-ADVANCED:INTERNAL=1
//Directory where python modules will be built
VTK_BUILD_PYTHON_MODULES_DIR:INTERNAL=C:/vtk/bin/bin/$<CONFIG>/Lib/site-packages
//ADVANCED property for variable: VTK_ENABLE_VTKPYTHON
VTK_ENABLE_VTKPYTHON-ADVANCED:INTERNAL=1
//Directory where python modules will be installed
VTK_INSTALL_PYTHON_MODULES_DIR:INTERNAL=bin/Lib/site-packages
//STRINGS property for variable: VTK_PYTHON_VERSION
VTK_PYTHON_VERSION-STRINGS:INTERNAL=2;2.7;3;3.3;3.4;3.5;3.6;3.7;
//ADVANCED property for variable: VTK_USE_SYSTEM_FREETYPE
VTK_USE_SYSTEM_FREETYPE-ADVANCED:INTERNAL=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190511/49ed7afb/attachment.html>


More information about the vtkusers mailing list