Pymunk shows a black window that suddenly desappears, how to solve?

64 Views Asked by At

I'm following this guide to approach Inverse Reinforcement Learning tecnique: https://github.com/jangirrishabh/toyCarIRL

I install everything as it says but when I arrive at python3 learning.py

my terminal reports:

pygame 2.0.1 (SDL 2.0.14, Python 3.8.5) Hello from the pygame community. https://www.pygame.org/contribute.html Loading chipmunk for Linux (64bit) [/home/MYNAME/.local/lib/python3.8/site-packages/pymunk/libchipmunk64.so] Istruzione non consentita (core dump creato)

The only things that I did in a different way from what it says are:

a) the installation of pygame: pip3 install pygame

b) the installation of setup.py python3 setup.py install --user

1

There are 1 best solutions below

0
On

Unfortunately Im not sure there is a easy solution. Pymunk 4 (which is used by toyCarIRL) is a very old version of Pymunk, that was released in 2013 and only tested on Python up to 3.3. It is not surprising it has some problems to run on newer Python versions.

I can see two things you can try:

Try to recompile the chipmunk lib included with Pymunk. Should be quite easy to try, but might not work.

  1. (Uninstall the pymunk you have installed already.)
  2. Just before you the instructions for toyCarIRL says you should install pymunk with python3 setup.py install, run python3 setup.py build_chipmunk.
  3. If you are lucky this will work, otherwise I think it will be easier and better to try to update the toyCarIRL project to use the newest Pymunk version.

Try to update toyCarIRL to work with the current version of Pymunk, 6.0.0. It should absolutely be possible, but might be a bit of work since many things have changed since 4.0.