当前位置:网站首页>安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
2022-07-25 13:14:00 【抓紧爬起来不许摆烂】
1、 distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
如果你一开始就报错gcc的问题的话,可以尝试官方的解决方法:

翻译:
因为 mojoco_py 已经编译了需要链接到提供的 mujoco 二进制文件的本机代码,所以它在 linux 上的安装可能比纯 python 源包更具挑战性。
要在 ubuntu 上安装 mujoco-py,请确保安装了以下库:
sudo apt install libosmesa6-dev libgl1-mesa-glx libglfw3
如果安装了上述库,但仍然显示无法找到 -1GL 的错误,则很可能需要直接创建符号链接:
sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so
2、FileNotFoundError: [Errno 2] No such file or directory: ‘patchelf’: ‘patchelf’
正常的话,import mujoco_py不会报上面gcc错误了……而是,报另一个错误
FileNotFoundError: [Errno 2] No such file or directory: ‘patchelf’: ‘patchelf’
安装patchelf就可以解决
$ sudo apt-get update -y
$ sudo apt-get install -y patchelf
3、 ERROR: GLEW initalization error: Missing GL version’ & Missing path to your environment variable.
运行使用mujoco_py的代码时,如果有调用可视化窗口env.render(),可能会有如下报错
Creating window glfw
ERROR: GLEW initalization error: Missing GL version
解决方法为:
先安装package
$ sudo apt-get install libglew-dev
(可能会出现依赖项无法安装等等,同上依次手动安装)
然后在~/.bashrc文件中添加如下路径
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so
然后在终端
$ source ~/.bashrc
如此,便可以在终端运行相关程序代码。
但是如果在pycharm中,可能还是会报错,它不会识别调用该路径,包括安装的mujoco_210的路径也无法识别调用,会报错
Missing path to your environment variable.
Current values LD_LIBRARY_PATH=
Please add following line to .bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dreamer/.mujoco/mujoco210/bin
需要手动添加路径,在pycharm中,
Run ——> Edit Configurations ——> Environment variables
然后,添加路径:
Name: LD_LIBRARY_PATH
Value: $LD_LIBRARY_PATH:/home/(用户名)/.mujoco/mujoco200/bin
Name: LD_PRELOAD
Value: /usr/lib/x86_64-linux-gnu/libGLEW.so
边栏推荐
- 若依如何实现用户免密登录配置方法?
- Generate SQL script file by initializing the latest warehousing time of vehicle attributes
- The programmer's father made his own AI breast feeding detector to predict that the baby is hungry and not let the crying affect his wife's sleep
- 手写jdbc的使用步骤?
- 【GCN-CTR】DC-GNN: Decoupled GNN for Improving and Accelerating Large-Scale E-commerce Retrieval WWW22
- 外围系统调用SAP的WebAPI接口
- massCode 一款优秀的开源代码片段管理器
- Programmer growth chapter 27: how to evaluate requirements priorities?
- G027-OP-INS-RHEL-04 RedHat OpenStack 创建自定义的QCOW2格式镜像
- Excel录制宏
猜你喜欢

vim基础操作汇总

The larger the convolution kernel, the stronger the performance? An interpretation of replknet model
![[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)](/img/05/86eed30a7c063beace400a005e4a4c.png)
[ai4code final chapter] alphacode: competition level code generation with alphacode (deepmind)

Emqx cloud update: more parameters are added to log analysis, which makes monitoring, operation and maintenance easier

0713RHCSA

机器学习强基计划0-4:通俗理解奥卡姆剃刀与没有免费午餐定理

Excel添加按键运行宏

arm架构移植alsa-lib和alsa-utils一路畅通

Django 2 ----- 数据库与Admin

卷积神经网络模型之——VGG-16网络结构与代码实现
随机推荐
机器学习强基计划0-4:通俗理解奥卡姆剃刀与没有免费午餐定理
Excel import and export source code analysis
简单了解流
Vim技巧:永远显示行号
Connotation and application of industrial Internet
程序的内存布局
Shell常用脚本:检测某域名、IP地址是否通
如何理解Keras中的指标Metrics
【AI4Code】《Pythia: AI-assisted Code Completion System》(KDD 2019)
Basic knowledge of binary tree
基于百问网IMX6ULL_PRO开发板移植LCD多点触摸驱动(GT911)
Zero basic learning canoe panel (13) -- trackbar
Word style and multi-level list setting skills (II)
【GCN-RS】Learning Explicit User Interest Boundary for Recommendation (WWW‘22)
The larger the convolution kernel, the stronger the performance? An interpretation of replknet model
Mid 2022 review | latest progress of large model technology Lanzhou Technology
Programmer growth chapter 27: how to evaluate requirements priorities?
【GCN-CTR】DC-GNN: Decoupled GNN for Improving and Accelerating Large-Scale E-commerce Retrieval WWW22
0710RHCSA
Arrays常用方法