I have tried to install mujoco-py 2.1. But there is an error:command 'gcc' failed with exit status 1. It also says failed building wheel for mujoco-py. I have tried to change gcc version to gcc7, but it doesn't work. Could someone help me?
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting mujoco-py<2.1,>=2.0
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/2f/48/b108057c1a23c8da9f4cdc7a7c46ab7cec49c3563c0706d50f2527de6ba0/mujoco-py-2.0.2.13.tar.gz (792 kB)
Installing build dependencies ... done
WARNING: Missing build requirements in pyproject.toml for mujoco-py<2.1,>=2.0 from https://pypi.tuna.tsinghua.edu.cn/packages/2f/48/b108057c1a23c8da9f4cdc7a7c46ab7cec49c3563c0706d50f2527de6ba0/mujoco-py-2.0.2.13.tar.gz#sha256=d6ae66276b565af9063597fda70683a89c7356290f5ac3961b794ee90ec50eea.
WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'.
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Requirement already satisfied: imageio>=2.1.2 in /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages (from mujoco-py<2.1,>=2.0) (2.15.0)
Requirement already satisfied: fasteners~=0.15 in /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages (from mujoco-py<2.1,>=2.0) (0.17.3)
Requirement already satisfied: glfw>=1.4.0 in /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages (from mujoco-py<2.1,>=2.0) (2.5.3)
Requirement already satisfied: numpy>=1.11 in /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages (from mujoco-py<2.1,>=2.0) (1.19.5)
Requirement already satisfied: cffi>=1.10 in /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages (from mujoco-py<2.1,>=2.0) (1.15.0)
Requirement already satisfied: Cython>=0.27.2 in /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages (from mujoco-py<2.1,>=2.0) (0.29.28)
Requirement already satisfied: pycparser in /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages (from cffi>=1.10->mujoco-py<2.1,>=2.0) (2.21)
Requirement already satisfied: pillow>=8.3.2 in /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages (from imageio>=2.1.2->mujoco-py<2.1,>=2.0) (8.4.0)
Building wheels for collected packages: mujoco-py
Building wheel for mujoco-py (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /home/chuchi/anaconda3/envs/cs285/bin/python /home/chuchi/anaconda3/envs/cs285/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpndhqb464
cwd: /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93
Complete output (21 lines):
running bdist_wheel
running build
Removing old mujoco_py cext /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/cymj_2.0.2.13_36_linuxcpuextensionbuilder_36.so
Compiling /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/cymj.pyx because it depends on /tmp/pip-build-env-e4g36u_5/overlay/lib/python3.6/site-packages/Cython/Includes/cpython/type.pxd.
[1/1] Cythonizing /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/cymj.pyx
running build_ext
building 'mujoco_py.cymj' extension
creating /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder
creating /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6
creating /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp
creating /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-yvc3a426
creating /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93
creating /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py
creating /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/gl
gcc -pthread -B /home/chuchi/anaconda3/envs/cs285/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Imujoco_py -I/tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py -I/home/chuchi/.mujoco/mujoco200/include -I/tmp/pip-build-env-e4g36u_5/overlay/lib/python3.6/site-packages/numpy/core/include -I/home/chuchi/anaconda3/envs/cs285/include/python3.6m -c /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/cymj.c -o /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/cymj.o -fopenmp -w
gcc -pthread -B /home/chuchi/anaconda3/envs/cs285/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Imujoco_py -I/tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py -I/home/chuchi/.mujoco/mujoco200/include -I/tmp/pip-build-env-e4g36u_5/overlay/lib/python3.6/site-packages/numpy/core/include -I/home/chuchi/anaconda3/envs/cs285/include/python3.6m -c /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/gl/osmesashim.c -o /tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/generated/_pyxbld_2.0.2.13_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/gl/osmesashim.o -fopenmp -w
/tmp/pip-install-yvc3a426/mujoco-py_bdab9290139c443ab94b364d3e268d93/mujoco_py/gl/osmesashim.c:1:10: fatal error: GL/osmesa.h: 没有那个文件或目录
1 | #include <GL/osmesa.h>
| ^~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mujoco-py
Failed to build mujoco-py
ERROR: Could not build wheels for mujoco-py which use PEP 517 and cannot be installed directly