安装mujoco可以参考如下来链接:

Ubuntu20.04安装mujoco:

https://blog.csdn.net/qq_47997583/article/details/125400418

安装mujoco_py并测试时提示Cython.Compiler.Errors.CompileError:

https://blog.csdn.net/m0_38122847/article/details/133781095

在终端输入:

python3

>> import mujoco_py

报错:

Cython.Compiler.Errors.CompileError: /home/usr/.local/lib/python3.8/site-packages/mujoco_py/cymj.pyx
 

解决方案:把cython换成了0.29.21版本

pip uninstall cython

pip install cython==0.29.21

end


补充报错distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1

如果遇到这个报错,只需执行:

sudo apt install libosmesa6-dev

sudo apt-get -y install patchelf

参考:运行mujoco-py例程出现错误:distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code - 知乎 (zhihu.com)

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐