Skip to content
GitLab
  • Menu
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 777
    • Issues 777
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 212
    • Merge requests 212
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & 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
  • VTK
  • VTKVTK
  • Issues
  • #17810
Closed
Open
Created Mar 19, 2020 by Noam Bernstein@noam.bernstein

python wheel created on OS X leads to broken python module

I'm trying to use the wheel creation process in the current master (pre-9.0) with macports python 3.8.2. There's also an ongoing discussion at text. I can enable VTK_BUILD_WHEEL in cmake, compile, and do python setup.py bdist_wheel apparently successfully, but the resulting wheel leads to a broken module. When I try to import vtk, I get

Traceback (most recent call last):
  File "/Users/bernstei/Library/Python/3.8/lib/python/site-packages/vtkmodules/__init__.py", line 13, in <module>
    from . import vtkCommonCore
ImportError: dlopen(/Users/bernstei/Library/Python/3.8/lib/python/site-packages/vtkmodules/vtkCommonCore.cpython-38-darwin.so, 2): Library not loaded: @rpath/libvtkWrappingPythonCore.1.dylib
  Referenced from: /Users/bernstei/Library/Python/3.8/lib/python/site-packages/vtkmodules/vtkCommonCore.cpython-38-darwin.so
  Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bernstei/Library/Python/3.8/lib/python/site-packages/vtk.py", line 30, in <module>
    all_m = importlib.import_module('vtkmodules.all')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/bernstei/Library/Python/3.8/lib/python/site-packages/vtkmodules/__init__.py", line 15, in <module>
    import _vtkmodules_static
ModuleNotFoundError: No module named '_vtkmodules_static'

If I add $HOME/Library/Python/3.8/lib/python/site-packages/vtkmodule to DYLD_LIBRARY_PATH it works, suggesting to me that the libraries are not in the expected place (either in the wrong place, or not correctly indicating to python or the dyld loader where they are).

Assignee
Assign to
Time tracking