Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 832
    • Issues 832
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 240
    • Merge requests 240
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #18168
Closed
Open
Issue created Apr 06, 2021 by Andrew Maclean@amacleanDeveloper

Wrapping: PyCharm and TBB

This is windows specific and relates to the VTK Master.

If VTK_SMP_IMPLEMENTATION_TYPE is set to tbb then when using PyCharm we get the following error:

C:\Users\amaclean\Miniconda3\envs\VTK\python.exe D:/Users/amaclean/Development/Kitware/src/vtk-examples/src/Python/Visualization/CurvatureBandsWithGlyphs.py
Traceback (most recent call last):
  File "D:\Users\amaclean\Development\Kitware\build\VTK\bin\Lib\site-packages\vtkmodules\__init__.py", line 50, in <module>
    from . import vtkCommonCore
ImportError: DLL load failed while importing vtkCommonCore: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Users\amaclean\Development\Kitware\src\vtk-examples\src\Python\Visualization\CurvatureBandsWithGlyphs.py", line 5, in <module>
    import vtk
  File "D:\Users\amaclean\Development\Kitware\build\VTK\bin\Lib\site-packages\vtk.py", line 30, in <module>
    all_m = importlib.import_module('vtkmodules.all')
  File "C:\Users\amaclean\Miniconda3\envs\VTK\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "D:\Users\amaclean\Development\Kitware\build\VTK\bin\Lib\site-packages\vtkmodules\__init__.py", line 52, in <module>
    import _vtkmodules_static
ModuleNotFoundError: No module named '_vtkmodules_static'

Process finished with exit code 1

During the build lots of warnings warning C4324: 'tbb::detail::d1::task': structure was padded due to alignment specifier are generated for the VTK C++ classes and the Python wrapping.

If VTK_SMP_IMPLEMENTATION_TYPE is set to sequential then there are no issues with PyCharm.

Note that a command such as:

python D:\Users\amaclean\Development\Kitware\src\vtk-examples\src\Python\Visualization\CurvatureBandsWithGlyphs.py

works Ok in both cases, so it seems to be some issue with PyCharm, probably triggered by this commit: 514578f5

I am using oneapi-tbb-2021.1.1, PyCharm 2020.3.5 (Community Edition), Python 3.9.2. I have invalidated caches and restarted PyCharm, also removed all plugins. The virtual environment that I use hasn't changed and was working OK.

Assignee
Assign to
Time tracking