安装Mujoco、mujoco-py、multiagent-compete踩坑记录
1、pip install 时报错“ValueError: Unable to determine SOCKS version from socks://127.0.0.1:1080/”
每次打开terminal都要执行 export all_proxy="socks5://127.0.0.1:1080"
2、Box 2D
从网上下载相应的安装包时要注意python的版本,cp37表示python3.7,另外还要看看文件名是不是正确,有的时候要更改文件名才能安装,可以查看pip._internal.pep425tags
或者pip.wheel.pep425tags
(这一步不是必须的)
3、报错“GLEW initalization error: Missing GL version”
要向环境变量中添加“export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so”
sudo gedit ~/.bashrc
# 拉到最下面,复制粘贴:export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so,ctrl+s 保存,关闭
source ~/.bashrc
4、Failed to build mujoco-py
向环境变量中添加“export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/username(这里填写自己的用户名)/.mujoco/mujoco200/bin”方法同上
5、error: glew initalization error: missing gl version;GlfwError: Failed to initialize GLFW
安装glfw 安装完成后重启。
6、Failed to initialize GLFW;ERROR: could not initialize GLFW
先下载glfw,到官网上去下载source packge
export DISPLAY=:0 指定GPU
如果是通过ssh在服务器上使用mujoco,通常情况下是没法simulate的,也不能render!
7、ERROR: Could not build wheels for mujoco-py which use PEP 517 and cannot be installed directly
Same problem for me with the most recent release (mujoco 2.0.2.9). pip install mujoco_py==2.0.2.8
worked.
8、安装GLFW时:CMake Error at CMakeLists.txt:213 (message):RandR headers not found; install libxrandr development package
sudo apt-get install xorg-dev libglu1-mesa-dev
9、ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
pip uninstall numpy
pip install numpy
10、PermissionError: [Errno 13] Permission denied: b’/home/whz/mujoco-py/mujoco_py/generated/mujocopy-buildlock’
sudo chmod 777 path-to-venv (这里要写自己环境的路径!) /lib/pythonX.X/site-packages/mujoco_py/generated/
11、Could not load dynamic library ‘libcudart.so.11.0’;dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory;ModuleNotFoundError: No module named ‘tensorflow.contrib’
TensorFlow版本太高了,换小于2.0版本的比如1.13.2
12、AttributeError: module ‘mujoco_py’ has no attribute ‘load_model_from_path’
gym版本太高了,换低一点的,比如0.9.1