openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.88k stars 813 forks source link

gcc: error: unrecognized command line option ‘-R’ #797

Closed Melon-on closed 6 months ago

Melon-on commented 6 months ago

When i import mujoco_py, the gcc error "unrecognized command line option ‘-R’" occured.

Melon-on commented 6 months ago

I solved this issue by editing the file unixccompiler.py, located in lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py

Simply replace return "-R" + dir with return "-Wl,-rpath," + dir at line 264 of this file.

btw, the version of setuptools I used was 57.5.0.