-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fatal error: GL/osmesa.h: 没有那个文件或目录 #90
Comments
apt-file update |
It's sudo apt install libosmesa6-dev |
@HuachunWang Hi, I tried your solution. but it returns error like this: my system is Ubuntu 18.04 |
My OS is Ubuntu 16.04 and I try it again, it works! It seems that your problem is just about dependency, you could try "sudo apt install libosmesa6" first, then "sudo apt install libosmesa6-dev". |
Hello @HuachunWang my 18.04 has the file |
After apt-file search "GL/osmesa.h", you need run this command: sudo apt install libosmesa6-dev. |
I ran the install command and have the GL library installed in my system. But when importing mujoco_py I get the "GL/osmesa.h" package not found error. How do I link the location of my header files ERROR:
|
If possible, you can try to change anaconda3 environment to pure python3.5. I haven't used anaconda3. |
So my system was using Anaconda's gcc which was causing problems. In that case even though osmesa drivers were installed the compiler could not find them (Anaconda compiler). The solution is to source the native python environment and use system gcc. Thanks @HuachunWang ! |
If you install openai's baselines, you should |
how you solve this problem? |
pip3 install -U 'mujoco-py<1.50.2,>=1.50.1'
Collecting mujoco-py<1.50.2,>=1.50.1
Using cached mujoco-py-1.50.1.16.tar.gz
Collecting glfw>=1.4.0 (from mujoco-py<1.50.2,>=1.50.1)
Collecting numpy>=1.11 (from mujoco-py<1.50.2,>=1.50.1)
Using cached numpy-1.13.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting Cython>=0.25.2 (from mujoco-py<1.50.2,>=1.50.1)
Using cached Cython-0.26-cp35-cp35m-manylinux1_x86_64.whl
Collecting imageio>=2.1.2 (from mujoco-py<1.50.2,>=1.50.1)
Collecting pillow (from imageio>=2.1.2->mujoco-py<1.50.2,>=1.50.1)
Using cached Pillow-4.2.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting olefile (from pillow->imageio>=2.1.2->mujoco-py<1.50.2,>=1.50.1)
Building wheels for collected packages: mujoco-py
Running setup.py bdist_wheel for mujoco-py ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-ftgzdgl1/mujoco-py/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmp6pnyslm1pip-wheel- --python-tag cp35:
running bdist_wheel
running build
Compiling /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/cymj.pyx because it depends on /home/maizi/.local/lib/python3.5/site-packages/Cython/Includes/numpy/init.pxd.
[1/1] Cythonizing /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/cymj.pyx
running build_ext
building 'mujoco_py.cymj' extension
creating /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder
creating /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5
creating /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp
creating /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp/pip-build-ftgzdgl1
creating /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp/pip-build-ftgzdgl1/mujoco-py
creating /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py
creating /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/gl
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py -I/home/maizi/.mujoco/mjpro150/include -I/home/maizi/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -c /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/cymj.c -o /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/cymj.o -fopenmp -w
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py -I/home/maizi/.mujoco/mjpro150/include -I/home/maizi/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -c /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/gl/osmesashim.c -o /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/gl/osmesashim.o -fopenmp -w
/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/gl/osmesashim.c:1:23: fatal error: GL/osmesa.h: 没有那个文件或目录
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Failed building wheel for mujoco-py
Running setup.py clean for mujoco-py
Failed to build mujoco-py
Installing collected packages: glfw, numpy, Cython, olefile, pillow, imageio, mujoco-py
Running setup.py install for mujoco-py ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-ftgzdgl1/mujoco-py/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-0yrgnfe4-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_ext
building 'mujoco_py.cymj' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py -I/home/maizi/.mujoco/mjpro150/include -I/home/maizi/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -c /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/cymj.c -o /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/cymj.o -fopenmp -w
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py -I/home/maizi/.mujoco/mjpro150/include -I/home/maizi/.local/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -c /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/gl/osmesashim.c -o /tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.5/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/gl/osmesashim.o -fopenmp -w
/tmp/pip-build-ftgzdgl1/mujoco-py/mujoco_py/gl/osmesashim.c:1:23: fatal error: GL/osmesa.h: 没有那个文件或目录
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
The text was updated successfully, but these errors were encountered: