Environment#

See also

Global Configuration

Central reference for all global configuration, including pyvista.core.config.Config, module-level flags, and environment variables.

pyvista report

Generate the environment report from the command line.

VTK Backend

Installing and selecting a VTK backend.

PyVista Version Information#

The PyVista library provides a way of getting the version installed in your environment.

>>> # Output the version of PyVista.
>>> import pyvista as pv
>>> pv.version_info
(0, 44, 0)

VTK Version and Backend#

vtk_backend()

Return the name of the VTK build PyVista is running against.

The PyVista library is heavily dependent on VTK and provides an easy way of getting the version of VTK in your environment.

>>> # Output the version of VTK.
>>> import pyvista as pv
>>> pv.vtk_version_info
VTKVersionInfo(major=9, minor=1, micro=0)
>>> # Get the major version of VTK
>>> pv.vtk_version_info.major
9

Environment Report#

GPUInfo()

A class to hold GPU details.

Report([additional, ncol, text_width, sort, ...])

Generate a PyVista software environment report.

get_gpu_info()

Get all information about the GPU.

Runtime Controls#

These settings apply to the whole process. The state managers also work as context managers, applying only within the with block.

allow_new_attributes

Context manager to control setting new attributes on PyVista classes.

enable_smp_tools([backend, n_threads])

Enable a VTK SMP backend for filters that support shared-memory parallelism.

set_new_attribute(obj, name, value)

Set a new attribute for this object.

set_pickle_format(format)

Set the format used to serialize pyvista.DataObject when pickled.

vtk_snake_case

Context manager to control access to VTK's pythonic snake_case API.

vtk_verbosity

Context manager to set VTK verbosity level.