Python Package gr


GR is available on PyPI and we recommend installing it with pip:

pip install gr

This will automatically install both the GR runtime and the Python wrapper. You may need to install some additional dependencies on Linux:

  • Debian/Ubuntu:
    apt install libxt6 libxrender1 libgl1-mesa-glx libqt5widgets5
  • CentOS 7:
    yum install libXt libXrender libXext mesa-libGL qt5-qtbase-gui
  • Fedora 28:
    dnf install libXt libXrender libXext mesa-libGL qt5-qtbase-gui
  • openSUSE 42.3:
    zypper install libXt6 libXrender1 libXext6 Mesa-libGL1 libQt5Widgets5

For information on building the GR runtime yourself, see the Building the GR Runtime.

Getting Started

After installing GR, you can try it out by creating a simple plot:

from gr import pygr
pygr.plot(list(x**2 for x in range(100)))


You can find several tutorials on using GR in the Tutorials section.


You can find a collection of Python scripts using GR in the Examples section.