当前位置:网站首页>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
边栏推荐
- 【GCN-RS】Region or Global? A Principle for Negative Sampling in Graph-based Recommendation (TKDE‘22)
- Docker学习 - Redis集群-3主3从-扩容-缩容搭建
- C # basic learning (XXIII)_ Forms and events
- Excel add key run macro
- 【AI4Code】CodeX:《Evaluating Large Language Models Trained on Code》(OpenAI)
- Memory layout of program
- Docker learning - redis cluster -3 master and 3 slave - capacity expansion - capacity reduction building
- Based on Baiwen imx6ull_ Pro development board transplants LCD multi touch driver (gt911)
- 业务可视化-让你的流程图'Run'起来(3.分支选择&跨语言分布式运行节点)
- Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
猜你喜欢

【AI4Code】《Unified Pre-training for Program Understanding and Generation》 NAACL 2021

Docker学习 - Redis集群-3主3从-扩容-缩容搭建
![[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 "

并发编程 — 内存模型 JMM

从输入网址到网页显示

Convolutional neural network model -- vgg-16 network structure and code implementation

C # basic learning (XXIII)_ Forms and events

R language GLM generalized linear model: logistic regression, Poisson regression fitting mouse clinical trial data (dose and response) examples and self-test questions

B tree and b+ tree

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
随机推荐
0719RHCSA
[today in history] July 25: IBM obtained the first patent; Verizon acquires Yahoo; Amazon releases fire phone
业务可视化-让你的流程图'Run'起来(3.分支选择&跨语言分布式运行节点)
Machine learning strong foundation program 0-4: popular understanding of Occam razor and no free lunch theorem
【CSDN 年终总结】结束与开始,一直在路上—— “1+1=王”的2021总结
Substance designer 2021 software installation package download and installation tutorial
【AI4Code】《Unified Pre-training for Program Understanding and Generation》 NAACL 2021
Date and time function of MySQL function summary
手写jdbc的使用步骤?
Excel录制宏
基于百问网IMX6ULL_PRO开发板移植LCD多点触摸驱动(GT911)
Based on Baiwen imx6ull_ Ap3216 experiment driven by Pro development board
Detailed explanation of the training and prediction process of deep learning [taking lenet model and cifar10 data set as examples]
全网最简单解决方式1045-Access denied for user [email protected](using password:YES)
Excel添加按键运行宏
[300 opencv routines] 239. accurate positioning of Harris corner detection (cornersubpix)
Convolutional neural network model -- vgg-16 network structure and code implementation
B tree and b+ tree
[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
C # basic learning (XXIII)_ Forms and events