Vispy is a high-performance interactive 2D/3D data visualization library. Vispy leverages the computational power of modern Graphics Processing Units (GPUs) through the OpenGL library to display very large datasets.

For more information, see

vispy.use(app=None, gl=None)[source]

Set the usage options for vispy

Specify what app backend and GL backend to use.

app : str
The app backend to use (case insensitive). Standard backends:
  • ‘PyQt4’: use Qt widget toolkit via PyQt4.
  • ‘PyQt5’: use Qt widget toolkit via PyQt5.
  • ‘PySide’: use Qt widget toolkit via PySide.
  • ‘PySide2’: use Qt widget toolkit via PySide2.
  • ‘PyGlet’: use Pyglet backend.
  • ‘Glfw’: use Glfw backend (successor of Glut). Widely available on Linux.
  • ‘SDL2’: use SDL v2 backend.
  • ‘osmesa’: Use OSMesa backend
Additional backends:
  • ‘ipynb_webgl’: run vispy from a Jupyter notebook (not fully
  • ‘ipynb_vnc’: render in a Jupyter notebook via a VNC approach (experimental)
gl : str
The gl backend to use (case insensitive). Options are:
  • ‘gl2’: use Vispy’s desktop OpenGL API.
  • ‘pyopengl2’: use PyOpenGL’s desktop OpenGL API. Mostly for testing.
  • ‘es2’: (TO COME) use real OpenGL ES 2.0 on Windows via Angle. Availability of ES 2.0 is larger for Windows, since it relies on DirectX.
  • ‘gl+’: use the full OpenGL functionality available on your system (via PyOpenGL).

See also


If the app option is given, is called. If the gl option is given, vispy.gloo.use_gl() is called.

If an app backend name is provided, and that backend could not be loaded, an error is raised.

If no backend name is provided, Vispy will first check if the GUI toolkit corresponding to each backend is already imported, and try that backend first. If this is unsuccessful, it will try the ‘default_backend’ provided in the vispy config. If still not succesful, it will try each backend in a predetermined order.

vispy.sys_info(fname=None, overwrite=False)[source]

Get relevant system and debugging information

fname : str | None

Filename to dump info to. Use None to simply print.

overwrite : bool

If True, overwrite file (if it exists).

out : str

The system information as a string.

vispy.set_log_level(verbose, match=None, return_old=False)[source]

Convenience function for setting the logging level

verbose : bool, str, int, or None

The verbosity of messages to print. If a str, it can be either DEBUG, INFO, WARNING, ERROR, or CRITICAL. Note that these are for convenience and are equivalent to passing in logging.DEBUG, etc. For bool, True is the same as ‘INFO’, False is the same as ‘WARNING’.

match : str | None

String to match. Only those messages that both contain a substring that regexp matches 'match' (and the verbose level) will be displayed.

return_old : bool

If True, return the old verbosity level and old match.

See also



If verbose=='debug', then the vispy method emitting the log message will be prepended to each log message, which is useful for debugging. If verbose=='debug' or match is not None, then a small performance overhead is added. Thus it is suggested to only use these options when performance is not crucial.

vispy.test(label='full', extra_arg_string='', coverage=False)[source]

Test vispy software

label : str

Can be one of ‘full’, ‘unit’, ‘nobackend’, ‘extra’, ‘lineendings’, ‘flake’, ‘docs’, or any backend name (e.g., ‘qt’).

extra_arg_string : str | list of str

Extra arguments to sent to pytest. Can also be a list of str to more explicitly provide the arguments.

coverage : bool

If True, collect coverage data.