When installing the latest dev version from main without the [all] extra, importing ansys.meshing.prime raises the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\ANSYSDev\public\pyprimemesh\.venv2\lib\site-packages\ansys\meshing\prime\__init__.py", line 5, in <module>
from ansys.meshing.prime.core.model import Model
File "D:\ANSYSDev\public\pyprimemesh\.venv2\lib\site-packages\ansys\meshing\prime\core\model.py", line 41, in <module>
from ansys.meshing.prime.core.mesh import Mesh
File "D:\ANSYSDev\public\pyprimemesh\.venv2\lib\site-packages\ansys\meshing\prime\core\mesh.py", line 29, in <module>
import pyvista as pv
ModuleNotFoundError: No module named 'pyvista'
After manually installing PyVista:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\ANSYSDev\public\pyprimemesh\.venv2\lib\site-packages\ansys\meshing\prime\__init__.py", line 5, in <module>
from ansys.meshing.prime.core.model import Model
File "D:\ANSYSDev\public\pyprimemesh\.venv2\lib\site-packages\ansys\meshing\prime\core\model.py", line 41, in <module>
from ansys.meshing.prime.core.mesh import Mesh
File "D:\ANSYSDev\public\pyprimemesh\.venv2\lib\site-packages\ansys\meshing\prime\core\mesh.py", line 30, in <module>
from ansys.tools.visualization_interface import MeshObjectPlot
ModuleNotFoundError: No module named 'ansys.tools'
I think the root cause is that the visualization code is imported as part of the default import, but ansys-tools-visualization-interface is present only installed when the [all] extra is used on install.
🔍 Before submitting the issue
🐞 Description of the bug
When installing the latest dev version from
main
without the[all]
extra, importingansys.meshing.prime
raises the following exception:After manually installing PyVista:
I think the root cause is that the visualization code is imported as part of the default import, but
ansys-tools-visualization-interface
is present only installed when the[all]
extra is used on install.📝 Steps to reproduce
pip install git+https://github.com/ansys/pyprimemesh.git#egg=ansys-meshing-prime
(install latestmain
)💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2025R1
🐍 Which Python version are you using?
3.10
📦 Installed packages