Skip to content

kyamagu/skia-python

Repository files navigation

Skia python binding

CI PyPI version

Python binding to Skia Graphics Library.

Install

Binary package is available on PyPI:

pip install skia-python

Supported platforms: Python 3.8-3.13 (CPython) on

  • Linux x86_64, aarch64
  • macOS x86_64, arm64
  • Windows x86_64, arm64 ; arm64 for the windows 11 and Python 3.11-3.13 combination only.

IMPORTANT: Starting v87.9rc1 / v138.0rc1, libEGL.so (from mesa-libEGL, libglvnd, or your graphic card's vendor e.g. NVidia) is required to be present on Linux hosts. This is associated with the general change on Linux from X11 to Wayland, and from GTK3 to GTK4. Firefox started to use it in 2021 (instead of the older libGLX.so), so it is likely newer Linux systems already have it, but please check. skia-python v87.9 / v138.0+ supports hardware acceleration via both GLX (still the default under X11) and EGL (newly added).

For Linux platforms, there must be OpenGL, libEGL and fontconfig installed. Current Ubuntu needs libegl1 (and libegl-mesa0); on older Ubuntu the package names are libglvnd0 and libgl1-mesa-egl:

apt-get install libfontconfig1 libgl1-mesa-glx libgl1-mesa-egl libegl1 libglvnd0 libgl1-mesa-dri

Or:

yum install fontconfig mesa-libGL mesa-libEGL libglvnd-egl mesa-dri-drivers

For unsupported environment, check the build instruction.

Examples

Documentation

https://kyamagu.github.io/skia-python

Contributing

Feel free to post an issue or PR.