Skip to content

Dependency problem with pyvista for 3D visualization #943

Open
@jbusecke

Description

@jbusecke

Our group wants to use pyvista for some 3D visualizations on the pangeo google cloud but we are running into some dependency issues.

I tried to install pyvista using mamba in the command line.

mamba install pyvista

But when I try to import it I end up with this error:

import pyvista
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-f7165b0393f4> in <module>
----> 1 from pyvista import examples
      2 examples.plot_wave()

/srv/conda/envs/notebook/lib/python3.8/site-packages/pyvista/__init__.py in <module>
      5 
      6 from pyvista._version import __version__
----> 7 from pyvista.plotting import *
      8 from pyvista.utilities import *
      9 from pyvista.core import *

/srv/conda/envs/notebook/lib/python3.8/site-packages/pyvista/plotting/__init__.py in <module>
      4                      string_to_rgb, PARAVIEW_BACKGROUND)
      5 from .export_vtkjs import export_plotter_vtkjs, get_vtkjs_url
----> 6 from .helpers import plot, plot_arrows, plot_compare_four, plot_itk
      7 from .itkplotter import PlotterITK
      8 from .plotting import BasePlotter, Plotter, close_all

/srv/conda/envs/notebook/lib/python3.8/site-packages/pyvista/plotting/helpers.py in <module>
      5 
      6 import pyvista
----> 7 from pyvista.utilities import is_pyvista_dataset, assert_empty_kwargs
      8 from .plotting import Plotter
      9 from .theme import rcParams

/srv/conda/envs/notebook/lib/python3.8/site-packages/pyvista/utilities/__init__.py in <module>
      1 """Utilities routines."""
----> 2 from .errors import (GPUInfo, Observer, Report,
      3                      assert_empty_kwargs, get_gpu_info, send_errors_to_logging,
      4                      set_error_output_file, check_valid_vector)
      5 from .features import *

/srv/conda/envs/notebook/lib/python3.8/site-packages/pyvista/utilities/errors.py in <module>
     10 
     11 import pyvista
---> 12 from pyvista import _vtk
     13 
     14 def set_error_output_file(filename):

/srv/conda/envs/notebook/lib/python3.8/site-packages/pyvista/_vtk.py in <module>
     38     from vtkmodules.vtkRenderingVolume import (vtkFixedPointVolumeRayCastMapper,
     39                                                vtkGPUVolumeRayCastMapper)
---> 40     from vtkmodules.vtkRenderingVolumeOpenGL2 import (vtkOpenGLGPUVolumeRayCastMapper,
     41                                                       vtkSmartVolumeMapper)
     42     from vtkmodules.vtkRenderingOpenGL2 import (vtkOpenGLHardwareSelector,

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

I realize that a full install of pyvista is probably making the notebook image huge, but is there a way to install those dependencies, so that users can install a running pyvista version?

I found this issue (conda-forge/pygridgen-feedstock#10 (comment)) raised by @rsignell-usgs, but I wasn't able to use apt due to a permission error:

apt install libgl1-mesa-glx
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

Any help with this would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions