philkr / pystk

Python SuperTuxKart interface
Other
45 stars 29 forks source link

segmentation fault while pystk.init(config) #38

Open JonathanJao opened 2 years ago

JonathanJao commented 2 years ago

Describe the bug Pystk throws a segmentation fault when calling pystk.init(config)

To Reproduce

Python 3.9.9 (main, Apr 16 2022, 15:43:56) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pystk
>>> 
>>> 
>>> config = pystk.GraphicsConfig.hd()
>>> config.screen_width = 800
>>> config.screen_height = 600
>>> pystk.init(config)
Segmentation fault

System information: Verified occur on two systems: First without dedicated graphics:

Second with dedicated graphics:

Additional context pystk was installed with pip. Another issue opened earlier: https://github.com/philkr/pystk/issues/33

sttteephen commented 9 months ago

I had this same issue and running the following command fixed it.

apt-get install -y libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb ffmpeg curl patchelf libglfw3 libglfw3-dev cmake zlib1g zlib1g-dev swig

I was following the gym installation steps from this page and I am not sure why it fixed it or which package was needed.