Eclectic-Sheep / sheeprl

Distributed Reinforcement Learning accelerated by Lightning Fabric
https://eclecticsheep.ai
Apache License 2.0
275 stars 26 forks source link

Fix box-2d building in tests #179

Closed belerico closed 6 months ago

belerico commented 6 months ago

Last action was failing due to an error during the build of box2d-py. I think that the building command fails to recognize the installed swig package, causing the failure given by

swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.10.13/x64/bin/swig", line 5, in <module>
          from swig import swig
      ModuleNotFoundError: No module named 'swig'
      error: command '/opt/hostedtoolcache/Python/3.10.13/x64/bin/swig' failed with exit code 1

We can try to create a venv beforehand, install the swig package inside it and then install sheeprl, running the test after.

cc @michele-milesi