当前位置:网站首页>Install mujoco and report an error: distutils.errors DistutilsExecError: command ‘gcc‘ failed with exit status 1
Install mujoco and report an error: distutils.errors DistutilsExecError: command ‘gcc‘ failed with exit status 1
2022-07-25 13:20:00 【Hurry up and don't let it rot】
1、 distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
If you report an error at the beginning gcc If you have any questions , Try the official solution :

translate :
because mojoco_py Has been compiled and needs to link to the provided mujoco Native code of binary file , So it's in linux The installation on may be more than pure python Source package is more challenging .
To be in ubuntu Installation on mujoco-py, Please ensure that the following libraries are installed :
sudo apt install libosmesa6-dev libgl1-mesa-glx libglfw3
If the above libraries are installed , But it still shows that it can't be found -1GL Error of , You may need to create symbolic links directly :
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’
Normal word ,import mujoco_py I won't report it gcc Wrong. …… It is , Report another error
FileNotFoundError: [Errno 2] No such file or directory: ‘patchelf’: ‘patchelf’
install patchelf You can solve it
$ 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.
Run using mujoco_py When the code , If there is a call to the visualization window env.render(), The following errors may be reported
Creating window glfw
ERROR: GLEW initalization error: Missing GL version
The solution is :
Install first package
$ sudo apt-get install libglew-dev
( There may be dependencies that cannot be installed, etc , Install manually as above )
And then in ~/.bashrc Add the following path to the file
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so
And then at the terminal
$ source ~/.bashrc
such , You can run the relevant program code at the terminal .
But if pycharm in , You may still report an error , It does not recognize the path to call , Including installed mujoco_210 The path to is also unrecognized to call , Will report a mistake
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
You need to add the path manually , stay pycharm in ,
Run ——> Edit Configurations ——> Environment variables
then , Add a path :
Name: LD_LIBRARY_PATH
Value: $LD_LIBRARY_PATH:/home/( user name )/.mujoco/mujoco200/bin
Name: LD_PRELOAD
Value: /usr/lib/x86_64-linux-gnu/libGLEW.so
边栏推荐
- How to understand metrics in keras
- The migration of arm architecture to alsa lib and alsa utils is smooth
- 0720RHCSA
- Shell常用脚本:检测某域名、IP地址是否通
- R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题
- Any time, any place, super detective, seriously handle the case!
- 0713RHCSA
- Django 2 ----- database and admin
- 0717RHCSA
- [today in history] July 25: IBM obtained the first patent; Verizon acquires Yahoo; Amazon releases fire phone
猜你喜欢

ESP32-C3 基于Arduino框架下Blinker点灯控制10路开关或继电器组

C # basic learning (XXIII)_ Forms and events

Memory layout of program

C#基础学习(二十三)_窗体与事件
![[CSDN year-end summary] end and start, always on the way -](/img/51/a3fc5eba0eeb22b600260ee81ff9e6.png)
[CSDN year-end summary] end and start, always on the way - "2021 summary of" 1+1= Wang "

【GCN-RS】Towards Representation Alignment and Uniformity in Collaborative Filtering (KDD‘22)

二叉树基本知识
![[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)

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

R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题
随机推荐
0716RHCSA
【视频】马尔可夫链原理可视化解释与R语言区制转换MRS实例|数据分享
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
[six articles talk about scalablegnn] around www 2022 best paper PASCA
机器学习强基计划0-4:通俗理解奥卡姆剃刀与没有免费午餐定理
Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
Date and time function of MySQL function summary
从输入网址到网页显示
Esp32-c3 is based on blinker lighting control 10 way switch or relay group under Arduino framework
pycharm不能输入中文解决方法
Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘
Django 2 ----- database and admin
网络空间安全 渗透攻防9(PKI)
【AI4Code】《Unified Pre-training for Program Understanding and Generation》 NAACL 2021
工业互联网的内涵及其应用
Docker学习 - Redis集群-3主3从-扩容-缩容搭建
[figure attack and Defense] backdoor attacks to graph neural networks (sacmat '21)
【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)
Docekr学习 - MySQL8主从复制搭建部署
【AI4Code】《IntelliCode Compose: Code Generation using Transformer》 ESEC/FSE 2020