当前位置:网站首页>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
边栏推荐
- 外围系统调用SAP的WebAPI接口
- 0713RHCSA
- Masscode is an excellent open source code fragment manager
- Date and time function of MySQL function summary
- C # basic learning (XXIII)_ Forms and events
- 业务可视化-让你的流程图'Run'起来(3.分支选择&跨语言分布式运行节点)
- OAuth, JWT, oidc, you mess me up
- 【GCN-RS】Region or Global? A Principle for Negative Sampling in Graph-based Recommendation (TKDE‘22)
- 安装mujoco报错:distutils.errors.DistutilsExecError: command ‘gcc‘ failed with exit status 1
- 【重温SSM框架系列】15 - SSM系列博文总结【SSM杀青篇】
猜你喜欢

Docekr学习 - MySQL8主从复制搭建部署

基于百问网IMX6ULL_PRO开发板驱动AP3216实验

工业互联网的内涵及其应用

R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题

Redis visualizer RDM installation package sharing

录制和剪辑视频,如何解决占用空间过大的问题?

0713RHCSA

G027-OP-INS-RHEL-04 RedHat OpenStack 创建自定义的QCOW2格式镜像

Docekr learning - MySQL 8 master-slave replication setup deployment

为提高效率使用ParallelStream竟出现各种问题
随机推荐
程序员成长第二十七篇:如何评估需求优先级?
Business visualization - make your flowchart'run'(3. Branch selection & cross language distributed operation node)
Discussion on principle and application technology of MLIR
Generate SQL script file by initializing the latest warehousing time of vehicle attributes
Error: cannot find or load main class XXXX
Django 2 ----- database and admin
Common operations for Yum and VIM
Basic knowledge of binary tree
【CSDN 年终总结】结束与开始,一直在路上—— “1+1=王”的2021总结
B tree and b+ tree
mujoco+spinningup进行强化学习训练快速入门
6W+字记录实验全过程 | 探索Alluxio经济化数据存储策略
Introduction and features of numpy (I)
0720RHCSA
Excel record macro
卷积神经网络模型之——GoogLeNet网络结构与代码实现
[Video] Markov chain Monte Carlo method MCMC principle and R language implementation | data sharing
cv2.resize函数报错:error: (-215:Assertion failed) func != 0 in function ‘cv::hal::resize‘
Substance designer 2021 software installation package download and installation tutorial
Programmer growth chapter 27: how to evaluate requirements priorities?