Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cadquery and vtk compatibility #23

Open
msavtchouk-pf opened this issue Mar 1, 2024 · 6 comments
Open

cadquery and vtk compatibility #23

msavtchouk-pf opened this issue Mar 1, 2024 · 6 comments

Comments

@msavtchouk-pf
Copy link

msavtchouk-pf commented Mar 1, 2024

Hi all
We are using the latest pip-installable cadquery and we also recently added a new dependency (vtk==9.3.0)
Just importing those two in the same file:
import cadquery import vkt
Results in the following error:
ImportError: Initialization failed for vtkWebCore, not compatible with vtkmodules.vtkCommonCore

Since that the vtk version, used by cadquery is incompatible with vtk==9.3.0.
I could not find any pointers how to resolve this so far. Any help would be appreciated!

@msavtchouk-pf
Copy link
Author

Update: it is possible that our build system is not resolving the versions correctly. I am waiting for response from them to confirm that.

@jmwright
Copy link
Member

jmwright commented Mar 1, 2024

Could be related to this. I think that eventually we will remove VTK from the OCP wheels and have it as a dependency, but it is bundled for now. If conda is an option in your environment, you could try using that to make sure that there is not a deeper incompatibility that has been introduced in VTK 9.3.0 reference.

@adam-urbanczyk adam-urbanczyk transferred this issue from CadQuery/cadquery Mar 3, 2024
@jmwright
Copy link
Member

@msavtchouk-pf Can you manually install the appropriate wheel artifact from here and see if it fixes your problem (and if it even works correctly for you)? I removed the embedded version of VTK that we were building. I tested the Python 3.10 wheel on Debian and that at least works.

@mathstuf
Copy link

FWIW, this error in VTK comes when a VTK Python module is loaded without VTK's Python glue code being initialized. Where did this VTK come from?

@jmwright
Copy link
Member

@mathstuf It is built from source in this workflow.

@mathstuf
Copy link

mathstuf commented May 9, 2024

I think this is missing auditwheel (Linux) and delvewheel (Windows) at least to fix up the wheels to contain the appropriate VTK libraries. It seems like some other VTK build may be getting loaded via PATH or LD_LIBRARY_PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants