I am really new to both Linux and MuJoCo and I am really sorry to bother you guys.
I follow the tutorial from the readme in git.
Put the unzipped folder here:
tree .mujoco/
.mujoco/
โโโ mjkey.txt
โโโ mujoco200
โโโ bin
โย ย โโโ basic
โย ย โโโ compile
โย ย โโโ derivative
โย ย โโโ libglewegl.so
โย ย โโโ libglewosmesa.so
โย ย โโโ libglew.so
โย ย โโโ libglfw3.a
โย ย โโโ libglfw.so.3
โย ย โโโ libmujoco200nogl.so
โย ย โโโ libmujoco200.so
โย ย โโโ record
โย ย โโโ simulate
โย ย โโโ testspeed
โย ย โโโ testxml
โโโ doc
โย ย โโโ README.txt
โย ย โโโ REFERENCE.txt
โโโ include
โย ย โโโ glfw3.h
โย ย โโโ mjdata.h
โย ย โโโ mjmodel.h
โย ย โโโ mjrender.h
โย ย โโโ mjui.h
โย ย โโโ mjvisualize.h
โย ย โโโ mjxmacro.h
โย ย โโโ mujoco.h
โย ย โโโ uitools.c
โย ย โโโ uitools.h
โโโ model
โย ย โโโ arm26.xml
โย ย โโโ carpet.png
โย ย โโโ cloth.xml
โย ย โโโ grid1pin.xml
โย ย โโโ grid1.xml
โย ย โโโ grid2pin.xml
โย ย โโโ grid2.xml
โย ย โโโ hammock.xml
โย ย โโโ humanoid100.xml
โย ย โโโ humanoid.xml
โย ย โโโ loop.xml
โย ย โโโ marble.png
โย ย โโโ particle.xml
โย ย โโโ rope.xml
โย ย โโโ scene.xml
โย ย โโโ softbox.xml
โย ย โโโ softcylinder.xml
โย ย โโโ softellipsoid.xml
โย ย โโโ sponge.png
โโโ sample
โโโ basic.cpp
โโโ compile.cpp
โโโ derivative.cpp
โโโ makefile
โโโ mjx.cpp
โโโ mjxmake.m
โโโ record.cpp
โโโ simulate.cpp
โโโ testspeed.cpp
โโโ testxml.cpp
I try to change the envrionment variable first but it didn't work. So I put the folder back to where it is instructed, the .mujoco folder. Checking that I have cleared the variable I set before with printenv | grep mujoco, prints the following:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/maco/.mujoco/mujoco200/bin:/home/maco/.mujoco/bin
OLDPWD=/home/maco/mujoco-py
Then I run pip3 install -U 'mujoco-py<2.1,>=2.0' --user and get the following error:
Collecting mujoco-py<2.1,>=2.0
Using cached https://files.pythonhosted.org/packages/a9/c8/daac2e747a0a516f6a880bf73304bd58e18d8be5cea926e8a1e5938026e6/mujoco-py-2.0.2.2.tar.gz
Requirement already satisfied, skipping upgrade: Cython>=0.27.2 in /usr/local/lib/python3.6/dist-packages (from mujoco-py<2.1,>=2.0) (0.29.9)
Requirement already satisfied, skipping upgrade: cffi>=1.10 in /usr/local/lib/python3.6/dist-packages (from mujoco-py<2.1,>=2.0) (1.12.3)
Requirement already satisfied, skipping upgrade: glfw>=1.4.0 in /usr/local/lib/python3.6/dist-packages (from mujoco-py<2.1,>=2.0) (1.8.1)
Requirement already satisfied, skipping upgrade: imageio>=2.1.2 in /usr/local/lib/python3.6/dist-packages (from mujoco-py<2.1,>=2.0) (2.5.0)
Requirement already satisfied, skipping upgrade: lockfile>=0.12.2 in /usr/local/lib/python3.6/dist-packages (from mujoco-py<2.1,>=2.0) (0.12.2)
Requirement already satisfied, skipping upgrade: numpy>=1.11 in /usr/local/lib/python3.6/dist-packages (from mujoco-py<2.1,>=2.0) (1.15.4)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python3.6/dist-packages (from cffi>=1.10->mujoco-py<2.1,>=2.0) (2.19)
Requirement already satisfied, skipping upgrade: pillow in /usr/lib/python3/dist-packages (from imageio>=2.1.2->mujoco-py<2.1,>=2.0) (5.1.0)
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-install-cby_7arg/mujoco-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-cpg0uj_3 --python-tag cp36:
running bdist_wheel
running build
Removing old mujoco_py cext /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/cymj_2.0.2.2_36_linuxcpuextensionbuilder_36.so
Compiling /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/cymj.pyx because it depends on /usr/local/lib/python3.6/dist-packages/Cython/Includes/numpy/__init__.pxd.
[1/1] Cythonizing /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/cymj.pyx
running build_ext
building 'mujoco_py.cymj' extension
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-cby_7arg
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-cby_7arg/mujoco-py
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-cby_7arg/mujoco-py/mujoco_py
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-cby_7arg/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 -Imujoco_py -I/tmp/pip-install-cby_7arg/mujoco-py/mujoco_py -I/home/maco/.mujoco/mujoco200/include -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/cymj.c -o /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-cby_7arg/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 -Imujoco_py -I/tmp/pip-install-cby_7arg/mujoco-py/mujoco_py -I/home/maco/.mujoco/mujoco200/include -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/gl/osmesashim.c -o /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/gl/osmesashim.o -fopenmp -w
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/lib.linux-x86_64-3.6
creating /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/lib.linux-x86_64-3.6/mujoco_py
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/cymj.o /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/temp.linux-x86_64-3.6/tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/gl/osmesashim.o -L/home/maco/.mujoco/mujoco200/bin -Wl,--enable-new-dtags,-R/home/maco/.mujoco/mujoco200/bin -lmujoco200 -lglewosmesa -lOSMesa -lGL -o /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/_pyxbld_2.0.2.2_36_linuxcpuextensionbuilder/lib.linux-x86_64-3.6/mujoco_py/cymj.cpython-36m-x86_64-linux-gnu.so -fopenmp
error: [Errno 2] No such file or directory: 'patchelf': 'patchelf'
----------------------------------------
Failed building wheel for mujoco-py
Running setup.py clean for mujoco-py
Failed to build mujoco-py
Installing collected packages: 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-install-cby_7arg/mujoco-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ucvbjd8a/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
Removing old mujoco_py cext /tmp/pip-install-cby_7arg/mujoco-py/mujoco_py/generated/cymj_2.0.2.2_36_linuxcpuextensionbuilder_36.so
running build_ext
error: [Errno 2] No such file or directory: 'patchelf': 'patchelf'
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-cby_7arg/mujoco-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ucvbjd8a/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-cby_7arg/mujoco-py/
Thank you a lot!!
@cmacw What was the solution?
not OP but I ran into the same error, given the same initial setup (tree .mujoco gives the equivalent output).
This comment onwards shows that you can install the missing utility patchelf through the package manager of your OS distribution. Then retry the pip install command.
Hope that helps anyone else who stumbles on this issue
Most helpful comment
not OP but I ran into the same error, given the same initial setup (
tree .mujocogives the equivalent output).This comment onwards shows that you can install the missing utility
patchelfthrough the package manager of your OS distribution. Then retry the pip install command.Hope that helps anyone else who stumbles on this issue