安装mujoco出现问题总结

13 篇文章 0 订阅
6 篇文章 0 订阅

安装Mujoco可以根据此教程(https://blog.csdn.net/Youtian_/article/details/103841453),但是会出现问题,以下方案可以解决。

出现的问题:

在这里插入图片描述

1.ubuntu18 Could not build wheels for mujoco-py which use PEP 517 and cannot be installed directly
2. error: command ‘gcc’ failed with exit status 1
3. error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

解决问题

1,确保GCC已经安装。

解决问题2和3:

sudo apt-get install python-dev 

或者用这个:

apt-get install python-dev

解决GCC问题:如 distutils.errors.DistutilsExecError: command ‘gcc’ failed with exit status 1等GCC问题,运行如下代码:

sudo apt-get install libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev
2,先安装
sudo apt-get install python3.7-dev
sudo apt-get install build-essential python3-dev libssl-dev libffi-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev

发现还是解决不了问题,执行步骤3。

3,再安装
sudo apt-get install python3-dev
sudo apt-get install libevent-dev
sudo apt-get install libosmesa6-dev
sudo apt-get update -y
sudo apt-get install -y patchelf

之前网上有人说用:pip3 install --no-use-pep517 ‘mujoco-py<2.1,>=2.0’.
,但是我试过了,并不能解决问题。

完成上述步骤,基本可以解决问题。

在这里插入图片描述

4,如果还没解决:

用下面的命令,

pip install mujoco_py==2.0.2.8

此外,如果出现mpi4y问题可以参考此资料:https://bitbucket.org/mpi4py/mpi4py/issues/179/sudo-pip-install-mpi4py-and-get-the

参考资料:
[1] https://github.com/openai/mujoco-py
[2] https://stackoverflow.com/questions/26053982/setup-script-exited-with-error-command-x86-64-linux-gnu-gcc-failed-with-exit
[3] https://github.com/openai/mujoco-py/issues/492
[4] https://stackoverflow.com/questions/11094718/error-command-gcc-failed-with-exit-status-1-while-installing-eventlet
[5] https://blog.csdn.net/coder_Gray/article/details/77189002
[6] https://blog.csdn.net/Youtian_/article/details/103841453

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值