当前位置:网站首页>安装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
边栏推荐
- 机器学习强基计划0-4:通俗理解奥卡姆剃刀与没有免费午餐定理
- The world is exploding, and the Google server has collapsed
- Shell common script: get the IP address of the network card
- Oran special series-21: major players (equipment manufacturers) and their respective attitudes and areas of expertise
- Docekr学习 - MySQL8主从复制搭建部署
- Blindly expanding the scale of the meta universe has deviated from the development logic of the meta universe
- Shell common script: check whether a domain name and IP address are connected
- Docekr learning - MySQL 8 master-slave replication setup deployment
- Word style and multi-level list setting skills (II)
- Zero basic learning canoe panel (16) -- clock control/panel control/start stop control/tab control
猜你喜欢

Shell常用脚本:判断远程主机的文件是否存在

Cv2.resize function reports an error: error: (-215:assertion failed) func= 0 in function ‘cv::hal::resize‘

Django 2 ----- 数据库与Admin
![Detailed explanation of the training and prediction process of deep learning [taking lenet model and cifar10 data set as examples]](/img/70/2b5130be16d7699ef7db58d9065253.png)
Detailed explanation of the training and prediction process of deep learning [taking lenet model and cifar10 data set as examples]
详解浮点数的精度问题

Substance designer 2021 software installation package download and installation tutorial

Introduction to web security UDP testing and defense

How to solve the problem of taking up too much space when recording and editing videos?

Business visualization - make your flowchart'run'(3. Branch selection & cross language distributed operation node)

Common operations for Yum and VIM
随机推荐
全球都热炸了,谷歌服务器已经崩掉了
R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题
My creation anniversary
MLX90640 红外热成像仪测温传感器模块开发笔记(五)
全网最简单解决方式1045-Access denied for user [email protected](using password:YES)
0713RHCSA
[machine learning] experimental notes - emotion recognition
ThreadLocal&Fork/Join
mysql函数汇总之日期和时间函数
Convolutional neural network model -- alexnet network structure and code implementation
OAuth, JWT, oidc, you mess me up
Mlx90640 infrared thermal imager temperature sensor module development notes (V)
Shell常用脚本:判断远程主机的文件是否存在
Microsoft proposed CodeT: a new SOTA for code generation, with 20 points of performance improvement
[Video] visual interpretation of Markov chain principle and Mrs example of R language region conversion | data sharing
并发编程 — 内存模型 JMM
基于百问网IMX6ULL_PRO开发板移植LCD多点触摸驱动(GT911)
How to use causal inference and experiments to drive user growth| July 28 tf67
Online Learning and Pricing with Reusable Resources: Linear Bandits with Sub-Exponential Rewards: Li
【视频】马尔可夫链蒙特卡罗方法MCMC原理与R语言实现|数据分享