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

Installation of Cadquery results in import error on Mayavi #1280

Open
KwentiN-ui opened this issue Oct 16, 2023 · 2 comments
Open

Installation of Cadquery results in import error on Mayavi #1280

KwentiN-ui opened this issue Oct 16, 2023 · 2 comments

Comments

@KwentiN-ui
Copy link

Problem description

Installation of the Cadquery Package through PIP breaks the import of Mayavi inside Python Scripts.

$ pip install mayavi
$ pip install PyQt5

works fine until

$ pip install cadquery

Which results in this error message when running from mayavi import mlab:

Traceback (most recent call last):
  File "c:\Users\quent\Downloads\projektion\test2.py", line 1, in <module>
    from mayavi import mlab
  File "C:\Users\quent\AppData\Local\Programs\Python\Python311\Lib\site-packages\mayavi\mlab.py", line 16, in <module>
    from mayavi.tools.camera import view, roll, yaw, pitch, move
  File "C:\Users\quent\AppData\Local\Programs\Python\Python311\Lib\site-packages\mayavi\tools\camera.py", line 24, in <module>
    from .engine_manager import get_engine
  File "C:\Users\quent\AppData\Local\Programs\Python\Python311\Lib\site-packages\mayavi\tools\engine_manager.py", line 14, in <module>
    from mayavi.core.registry import registry
  File "C:\Users\quent\AppData\Local\Programs\Python\Python311\Lib\site-packages\mayavi\core\registry.py", line 16, in <module>
    from mayavi.core.metadata import Metadata, import_symbol
  File "C:\Users\quent\AppData\Local\Programs\Python\Python311\Lib\site-packages\mayavi\core\metadata.py", line 11, in <module>
    from mayavi.core.pipeline_info import PipelineInfo
  File "C:\Users\quent\AppData\Local\Programs\Python\Python311\Lib\site-packages\mayavi\core\pipeline_info.py", line 12, in <module>
    from .utils import get_tvtk_dataset_name
  File "C:\Users\quent\AppData\Local\Programs\Python\Python311\Lib\site-packages\mayavi\core\utils.py", line 2, in <module>
    import vtk
  File "C:\Users\quent\AppData\Local\Programs\Python\Python311\Lib\site-packages\vtk.py", line 43, in <module>
    from vtkmodules.vtkRenderingVolumeAMR import *
ImportError: Initialization failed for vtkRenderingVolumeAMR, not compatible with vtkmodules.vtkImagingCore

This error occured on 2 seperate machines running Python 3.10 and 3.11. I assume this is a poblem with mayavi, as cadquery is running fine.
Unfortunately I need Cadquery and Mayavi inside the same environment , so I can't really seperate them into environments.
I already tried a fresh reinstall of Python which results in Mayavi working until I install Cadquery.
Any help would be appreciated!

@quentinodigiminlabs
Copy link

Hi there, I do not know if you were able to find a workaround but if yes I am interested as I face the same problem

@KwentiN-ui
Copy link
Author

Hi there, I do not know if you were able to find a workaround but if yes I am interested as I face the same problem

I did not I'm afraid. I just avoid installing them at the same time :(

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

2 participants