google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
8.01k stars 802 forks source link

“pip install mujoco” get stuck #349

Closed zhihaocheng closed 2 years ago

zhihaocheng commented 2 years ago

Hi,

I'm a student and I'm trying to use MuJoCo for my research. And I'm looking for some help with the installation of mujoco.

There are mujocos for C/CXX and for python. Hence, to distinguish, I denote them as Mujoco(C/CXX) and Mujoco(Python), respectively. Mujoco(C/CXX) can be installed by building from source or just download a precomplied version. Mujoco(Python) can be installed using pip or building from source.

After installing Mujoco(C/CXX) (The server maintainer installed Mujoco2.2.0 from source and provided a module that I can load), I tried to run “pip install mujoco” to install Mujoco(Python). There were no bugs reported but just got stuck. I waited for about two hours but the installation process was still not finished. Could you please help me? I have also tried to build Mujoco(Python) from source, but the same problem occurred.

""" (mujocotest) [zhc]$ pip install mujoco Collecting mujoco Using cached mujoco-2.2.0.tar.gz (138 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: absl-py in /home/zch/.local/lib/python3.7/site-packages (from mujoco) (0.15.0) Requirement already satisfied: glfw in /home/zch/.local/lib/python3.7/site-packages (from mujoco) (2.5.3) Requirement already satisfied: numpy in /home/zch/.local/lib/python3.7/site-packages (from mujoco) (1.19.5) Requirement already satisfied: pyopengl in /home/zch/.local/lib/python3.7/site-packages (from mujoco) (3.1.6) Requirement already satisfied: six in /usr/local/python/3.7.7/lib/python3.7/site-packages (from absl-py->mujoco) (1.15.0) Building wheels for collected packages: mujoco Building wheel for mujoco (setup.py) ... /

"""

kevinzakka commented 2 years ago

Hi @zhihaocheng, a copy of the MuJoCo binaries is provided as part of the pip package so you don't need to install the "C/CXX" binaries separately. Can you try creating a fresh python virtual environment (I recommend miniconda) and then installing MuJoCo (pip install --upgrade mujoco)? And then let me know if there are any errors.

saran-t commented 2 years ago

I'm a bit surprised that pip install mujoco is triggering a source installation for you. Is your server configured to not connect to PyPI but use a local repository?

My recommendation if you're not intending to modify MuJoCo is to get a bdist wheel from PyPI, either via pip or by manually downloading it from pypi.org.

zhihaocheng commented 2 years ago

Thanks @kevinzakka. I have followed your advice but the same problem occurred. The detailed installation process and information about the system is attached as follows.

First, create environment and then activate. I did not use miniconda or anaconda because the server does not support them well, and I must load provided python versions.

-> virtualenv --system-site-packages ~/envs/testmujoco -> source ~/envs/testmujoco/bin/activate

Load necessary modules and upgrade pip. -> module load python/3.7.7 -> module load cmake/3.21.1 (without this module, an error occurred. ) -> python -m pip install --upgrade pip

Export MUJOCO_PATH -> export MUJOCO_PATH=~/mujocosource/mujoco-2.2.0 (this is the path to the mujoco . Without this path, an error occurred.)

After that I can run pip install mujoco, but it got stuck. The server is provided by the university. So I have no access to root and must use some provideded modules such as python and tensorflow. Maybe the system of the server is to old such that mujoco does not support?


Error without cmake. (testmujoco) [zch]$ pip install --upgrade mujoco Collecting mujoco Using cached mujoco-2.2.0.tar.gz (138 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: absl-py in ./.local/lib/python3.7/site-packages (from mujoco) (0.15.0) Requirement already satisfied: glfw in ./.local/lib/python3.7/site-packages (from mujoco) (2.5.3) Requirement already satisfied: numpy in ./.local/lib/python3.7/site-packages (from mujoco) (1.19.5) Requirement already satisfied: pyopengl in ./.local/lib/python3.7/site-packages (from mujoco) (3.1.6) Requirement already satisfied: six in /usr/local/python/3.7.7/lib/python3.7/site-packages (from absl-py->mujoco) (1.15.0) Building wheels for collected packages: mujoco Building wheel for mujoco (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [34 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-37 creating build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/render_test.py -> build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/rollout.py -> build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/rollout_test.py -> build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/bindings_test.py -> build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/init.py -> build/lib.linux-x86_64-cpython-37/mujoco creating build/lib.linux-x86_64-cpython-37/mujoco/glfw copying mujoco/glfw/init.py -> build/lib.linux-x86_64-cpython-37/mujoco/glfw creating build/lib.linux-x86_64-cpython-37/mujoco/osmesa copying mujoco/osmesa/init.py -> build/lib.linux-x86_64-cpython-37/mujoco/osmesa creating build/lib.linux-x86_64-cpython-37/mujoco/egl copying mujoco/egl/egl_ext.py -> build/lib.linux-x86_64-cpython-37/mujoco/egl copying mujoco/egl/init.py -> build/lib.linux-x86_64-cpython-37/mujoco/egl running build_ext Configuring CMake with the following arguments: -DPython3_ROOT_DIR:PATH=~/envs/testmujoco -DPython3_EXECUTABLE:STRING=~/envs/testmujoco/bin/python -DCMAKE_MODULE_PATH:PATH=/tmp/pbs.6363806.pbsserver/pip-install-jv6zno69/mujoco_7813dcb2c5754bdf98268cdf968f35b7/cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=build/temp.linux-x86_64-cpython-37 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=:BOOLON -DCMAKE_Fortran_COMPILER:STRING= -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_TESTING:BOOL=OFF -DMUJOCO_LIBRARY_DIR:PATH=~/mujocosource/mujoco-2.2.0/lib -DMUJOCO_INCLUDE_DIR:PATH=~/mujocosource/mujoco-2.2.0/include -DPython3_LIBRARY=/usr/local/python/3.7.7/lib/python3.7 -DPython3_INCLUDE_DIR=/usr/local/python/3.7.7/include/python3.7m error: [Errno 2] No such file or directory: 'cmake': 'cmake' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mujoco Running setup.py clean for mujoco Failed to build mujoco

Error without MUJOCO_PATH (testmujoco) [zhc]$ pip install --upgrade mujoco Collecting mujoco Using cached mujoco-2.2.0.tar.gz (138 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: absl-py in ./.local/lib/python3.7/site-packages (from mujoco) (0.15.0) Requirement already satisfied: glfw in ./.local/lib/python3.7/site-packages (from mujoco) (2.5.3) Requirement already satisfied: numpy in ./.local/lib/python3.7/site-packages (from mujoco) (1.19.5) Requirement already satisfied: pyopengl in ./.local/lib/python3.7/site-packages (from mujoco) (3.1.6) Requirement already satisfied: six in /usr/local/python/3.7.7/lib/python3.7/site-packages (from absl-py->mujoco) (1.15.0) Building wheels for collected packages: mujoco Building wheel for mujoco (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [57 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-37 creating build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/render_test.py -> build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/rollout.py -> build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/rollout_test.py -> build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/bindings_test.py -> build/lib.linux-x86_64-cpython-37/mujoco copying mujoco/init.py -> build/lib.linux-x86_64-cpython-37/mujoco creating build/lib.linux-x86_64-cpython-37/mujoco/glfw copying mujoco/glfw/init.py -> build/lib.linux-x86_64-cpython-37/mujoco/glfw creating build/lib.linux-x86_64-cpython-37/mujoco/osmesa copying mujoco/osmesa/init.py -> build/lib.linux-x86_64-cpython-37/mujoco/osmesa creating build/lib.linux-x86_64-cpython-37/mujoco/egl copying mujoco/egl/egl_ext.py -> build/lib.linux-x86_64-cpython-37/mujoco/egl copying mujoco/egl/init.py -> build/lib.linux-x86_64-cpython-37/mujoco/egl running build_ext Traceback (most recent call last): File "", line 36, in File "", line 34, in File "/tmp/pbs.6363806.pbsserver/pip-install-9s9wfcn2/mujoco_673a74011cbe456d8d97c294fadfc071/setup.py", line 312, in 'include/mujoco/*.h', File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(**attrs) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 148, in setup return run_commands(dist) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 163, in run_commands dist.run_commands() File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands self.run_command(cmd) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/dist.py", line 1224, in run_command super().run_command(command) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "~/envs/testmujoco/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run self.run_command('build') File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/dist.py", line 1224, in run_command super().run_command(command) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 136, in run self.run_command(cmd_name) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/dist.py", line 1224, in run_command super().run_command(command) File "~/envs/testmujoco/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 986, in run_command cmd_obj.run() File "/tmp/pbs.6363806.pbsserver/pip-install-9s9wfcn2/mujoco_673a74011cbe456d8d97c294fadfc071/setup.py", line 143, in run self._mujoco_framework_path) = self._find_mujoco() File "/tmp/pbs.6363806.pbsserver/pip-install-9s9wfcn2/mujoco_673a74011cbe456d8d97c294fadfc071/setup.py", line 154, in _find_mujoco raise RuntimeError(f'{MUJOCO_PATH} environment variable is not set') RuntimeError: MUJOCO_PATH environment variable is not set [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mujoco Running setup.py clean for mujoco Failed to build mujoco

Server System Information -> uname -a Linux hpc055 2.6.32-696.16.1.el6.x86_64 #1 SMP Wed Nov 15 16:51:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

-> lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.9 (Final) Release: 6.9 Codename: Final

zhihaocheng commented 2 years ago

Thanks @saran-t. I am not clear whether the server uses a local repository. The server is provided by the university. So I have no access to root and must use some provideded modules such as python and tensorflow. But I guess mujoco could connect to Pypi because I am the first to configure mujoco on the server of the university.

According to your advice, I downloaded Mujoco from Pypi and tried to install it. However, it failed again. Could you please refer to the above response to kevinzakka for more details on the environment and server.

(testmujoco) [zhc]$ wget https://files.pythonhosted.org/packages/81/9b/c1f7d49c78ece63412c7f54fa0b89e5a81702e28cd46ea787f9bbd49b489/mujoco-2.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl --2022-06-18 12:19:00-- https://files.pythonhosted.org/packages/81/9b/c1f7d49c78ece63412c7f54fa0b89e5a81702e28cd46ea787f9bbd49b489/mujoco-2.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Resolving files.pythonhosted.org... 151.101.29.63, 2a04:4e42:7::319 Connecting to files.pythonhosted.org|151.101.29.63|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 3526854 (3.4M) [application/octet-stream] Saving to: “mujoco-2.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl”

100%[===============================================================================================================================================>] 3,526,854 --.-K/s in 0.08s

2022-06-18 12:19:00 (40.7 MB/s) - “mujoco-2.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl” saved [3526854/3526854]

(testmujoco) [zhc]$ pip install mujoco-2.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl ERROR: mujoco-2.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl is not a supported wheel on this platform.

saran-t commented 2 years ago

The problem is that the machine is running CentOS 6, which reached its end-of-life since November 2020.

Our Linux wheels are built to target manylinux2014 compatibility requirements, which should be good for CentOS 7 or later.

We used to target manylinux2010 briefly, but since that's no longer recommended upstream due to CentOS 6 being EoL we migrated to manylinux2014. I realise this might not help you, but my recommendation would be to see if your sysadmin is willing to upgrade the server to CentOS 7 or later, since otherwise the machine wouldn't get any further upstream upgrade.

Failing that, you'll unfortunately have to build from source. To troubleshoot pip being stuck, please rerun it with -vvv so that we get some more message.

zhihaocheng commented 2 years ago

Thanks @saran-t. The server is used for all university students, and there are no plans to update the system. I run pip with -vvv, and the log information is attached as follows.

(testmujoco) [zch]$ pip install -vvv mujoco Using pip 22.1.2 from /project/RDS-FEI-ImitationLearn-RW/.local/lib/python3.7/site-packages/pip (python 3.7) Defaulting to user installation because normal site-packages is not writeable Created temporary directory: /tmp/pbs.6369584.pbsserver/pip-ephem-wheel-cache-ly7f56un Created temporary directory: /tmp/pbs.6369584.pbsserver/pip-build-tracker-3h6o0oe0 Initialized build tracking at /tmp/pbs.6369584.pbsserver/pip-build-tracker-3h6o0oe0 Created build tracker: /tmp/pbs.6369584.pbsserver/pip-build-tracker-3h6o0oe0 Entered build tracker: /tmp/pbs.6369584.pbsserver/pip-build-tracker-3h6o0oe0 Created temporary directory: /tmp/pbs.6369584.pbsserver/pip-install-cu67c6ck 1 location(s) to search for versions of mujoco:

saran-t commented 2 years ago

The last line that you see when it gets stuck is "mujoco::FindOrFetch: Using FetchContent to retrieve eigen" correct? I just want to make sure that the paste didn't get clipped.

EDIT: I just noticed that you are trying to compile with GCC 4.4.7 which is extremely old. In particular, that compiler does not support C++17 so will not be able to build this codebase even if we manage to get pass this point. Is there any other compiler installed on the server?

zhihaocheng commented 2 years ago

Thank you. I can confirm that the last line is "mujoco::FindOrFetch: Using FetchContent to retrieve eigen".

In terms of the GCC version, I also loaded and tried GCC 9.1.0, which is the newest version on the server. However, it still got stuck as my last post. Besides, I have tried to use llvm/14.0.0 and clang/6.0.1. I manually load these packages and export them as compliers. And then run pip install mujoco. However, I waited for about 1.5 hours and it got stuck again. The output is attached at the end of this post.

Actually, the server provides various compilers, which are listed as follows (testmujoco) [zhc]$ module avail |& grep gcc fftw/2.1.5-gcc fftw/3.3.3-gcc(default) fftw/3.3.4-gcc gcc/12.1.0 gcc/4.8.4 gcc/4.9.0 gcc/4.9.3(default) gcc/4.9.4 gcc/5.4.0 gcc/5.5.0 gcc/6.2.0 gcc/7.4.0 gcc/7.5.0 gcc/8.4.0 gcc/9.1.0 gromacs/4.6.7-openmpi-gcc gromacs/5.1.4-openmpi-gcc gromacs/5.1-openmpi-gcc gromacs-plumed/5.1.4-openmpi-gcc-plumed-2.2.4 gromacs-plumed/5.1.4-openmpi-gcc-plumed-2.3.0(default) hdf5-gcc-mpich-3.2/1.10.1(default) hdf5-gcc-openmpi/1.10.1 hdf5-gcc-openmpi/1.8.16(default) hdf5-gcc-openmpi-1.10.3/1.10.4(default) hdf5-gcc-openmpi-3.0.0/1.10.1(default) hdf5-gcc-openmpi-3.1.3/1.10.4(default) hdf5-gcc-openmpi-3.1.3-cuda10/1.10.4(default) hdf5-gcc-openmpi-cuda/1.10.1(default) liggghts-public/3.8.0-openmpi-gcc molpro/2015-gcc-mpi molpro/2015-gcc-mpi-test2 namd/2.10-openmpi-gcc(default) namd/2.11-openmpi-gcc namd/2.12-openmpi-gcc openmpi-gcc/1.10.2 openmpi-gcc/1.10.3 openmpi-gcc/1.10.7 openmpi-gcc/1.8.4(default) openmpi-gcc/1.8.4-6.x openmpi-gcc/1.8.4-backup openmpi-gcc/2.1.2 openmpi-gcc/3.0.0 openmpi-gcc/3.0.0-64 openmpi-gcc/3.0.0-cuda openmpi-gcc/3.0.1 openmpi-gcc/3.1.3 openmpi-gcc/3.1.3-cuda10 openmpi-gcc/3.1.4 openmpi-gcc/3.1.5 openmpi-gcc/3.1.5a openmpi-gcc/4.0.0-cuda10 openmpi-gcc/4.0.3 openmpi-gcc/4.1.1 petsc-gcc/3.7.6(default) petsc-gcc-mpich/3.11.1 petsc-gcc-mpich/3.13.6 petsc-gcc-mpich/3.14.1 petsc-gcc-mpich/3.15.2 petsc-gcc-mpich/3.7.6 petsc-gcc-mpich/3.9.3(default) petsc-gcc-openmpi/3.7.6(default) petsc-gcc-openmpi/3.8.4 petsc-gcc-openmpi/3.9.3

(testmujoco) [zhc]$ module avail |& grep llvm llvm/11.1.0 llvm/14.0.0(default) llvm/6.0.1 (testmujoco) [zhc]$ module avail |& grep clang clang/6.0.1(default)

(testmujoco) [zhc]$ pip install --upgrade -vvv mujoco Using pip 22.1.2 from /project/RDS-FEI-ImitationLearn-RW/.local/lib/python3.7/site-packages/pip (python 3.7) Defaulting to user installation because normal site-packages is not writeable Created temporary directory: /tmp/pbs.6371704.pbsserver/pip-ephem-wheel-cache-pyglgx Created temporary directory: /tmp/pbs.6371704.pbsserver/pip-build-tracker-cjeegs9e Initialized build tracking at /tmp/pbs.6371704.pbsserver/pip-build-tracker-cjeegs9e Created build tracker: /tmp/pbs.6371704.pbsserver/pip-build-tracker-cjeegs9e Entered build tracker: /tmp/pbs.6371704.pbsserver/pip-build-tracker-cjeegs9e Created temporary directory: /tmp/pbs.6371704.pbsserver/pip-install-y9bq5kdf 1 location(s) to search for versions of mujoco:

nimrod-gileadi commented 2 years ago

Are you able to access the eigen git repository from the server? i.e:

git clone -n https://gitlab.com/libeigen/eigen
cd eigen
git checkout 3147391d946bb4b6c68edd901f2add6ac1f31f8c
saran-t commented 2 years ago

@zhihaocheng any luck?

zhihaocheng commented 2 years ago

Thanks @nimrod-gileadi. Thank you @saran-t. I have tried to git clone eigen and the server is able to access it. A difference is that the code working is as follows. However, even if I clone eigen, the same problem occurs as in my last post.

git clone -n https://gitlab.com/libeigen/eigen.git
saran-t commented 2 years ago

Is this issue still affecting you?

zhihaocheng commented 2 years ago

Is this issue still affecting you?

Thanks @saran-t and sorry for the late reply. Actually, I cannot solve this problem until now. I can only run experiments on some small workstations that I have the root privilege rather than the HPC of the university, which slows down my research. Thanks again for you contact, and I will close this issue.

saran-t commented 2 years ago

@zhihaocheng the only suggestion I have is to clone the Eigen repo manually and point CMake to it using the -DFETCHCONTENT_SOURCE_DIR_EIGEN3:PATH=/path/to/your/eigen" flag.

zhihaocheng commented 2 years ago

Hi @saran-t , thanks for your advice. I will try it. In the previous discussion, you said that the problem is due to running on CentOS 6. Would it be possible that I build the mujoco on a CentOS 6 machine that I have full control from source and then migrate the compiled files to the HPC of university?

saran-t commented 2 years ago

Yes that should work.

zhihaocheng commented 2 years ago

Thanks @saran-t , I'm one step closer to solving the problem. Today, I tried to install the Python Mujoco by building from source. I find that the previous problem is resulted from the URL of eigen. If I replace "https://gitlab.com/libeigen/eigen" with "https://gitlab.com/libeigen/eigen.git" in mujoco-2.2.1/python/mujoco/CMakeLists.txt, the building wheel process with not be stuck. However, a further problem appeared as follows. I have searched in Google, but failed to find what is wrong with /usr/bin/ld. Could you please help me?

Currently Loaded Modulefiles: 1) zlib/1.2.8 3) python/3.7.7 5) gmp/5.1.3 7) mpc/1.0.3 9) llvm/14.0.0 2) sqlite/3080802 4) cmake/3.21.1 6) mpfr/3.1.4 8) gcc/8.4.0 10) clang/6.0.1

I also explicitly assign the complier. export CC=/usr/local/llvm/14.0.0/bin/clang export CXX=/usr/local/llvm/14.0.0/bin/clang++

pip wheel dist/mujoco-2.2.1.tar.gz, and then

[ 58%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_strings.dir/str_cat.cc.o [ 58%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_strings.dir/numbers.cc.o [ 58%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_strings.dir/str_replace.cc.o [ 58%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_strings.dir/str_split.cc.o [ 58%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_strings.dir/string_view.cc.o [ 58%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_strings.dir/substitute.cc.o [ 58%] Linking CXX static library libabsl_city.a [ 58%] Built target absl_city [ 58%] Linking CXX static library libabsl_malloc_internal.a [ 58%] Built target absl_malloc_internal [ 58%] Building CXX object _deps/abseil-cpp-build/absl/synchronization/CMakeFiles/absl_graphcycles_internal.dir/internal/graphcycles.cc.o [ 58%] Linking CXX static library libabsl_demangle_internal.a [ 58%] Built target absl_demangle_internal [ 58%] Linking CXX static library libabsl_graphcycles_internal.a [ 58%] Built target absl_graphcycles_internal [ 58%] Linking CXX static library libabsl_strings.a [ 58%] Built target absl_strings [ 58%] Building CXX object _deps/abseil-cpp-build/absl/debugging/CMakeFiles/absl_symbolize.dir/symbolize.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/hash/CMakeFiles/absl_hash.dir/internal/hash.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/time/CMakeFiles/absl_time.dir/civil_time.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_cord_internal.dir/internal/cord_internal.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/time/CMakeFiles/absl_time.dir/clock.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/time/CMakeFiles/absl_time.dir/duration.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_cord_internal.dir/internal/cord_rep_btree.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/time/CMakeFiles/absl_time.dir/time.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/time/CMakeFiles/absl_time.dir/format.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_cord_internal.dir/internal/cord_rep_btree_navigator.cc.o [ 66%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_cord_internal.dir/internal/cord_rep_btree_reader.cc.o [ 75%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_cord_internal.dir/internal/cord_rep_concat.cc.o [ 75%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_cord_internal.dir/internal/cord_rep_crc.cc.o [ 75%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_cord_internal.dir/internal/cord_rep_ring.cc.o [ 75%] Building CXX object _deps/abseil-cpp-build/absl/strings/CMakeFiles/absl_cord_internal.dir/internal/cord_rep_consume.cc.o [ 75%] Linking CXX shared module _constants.cpython-37m-x86_64-linux-gnu.so /usr/bin/ld: unrecognized option '-plugin' /usr/bin/ld: use the --help option for usage information clang-14: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: [_constants.cpython-37m-x86_64-linux-gnu.so] Error 1 gmake[1]: [CMakeFiles/_constants.dir/all] Error 2 gmake[1]: Waiting for unfinished jobs.... [ 75%] Linking CXX static library libabsl_symbolize.a [ 75%] Built target absl_symbolize [ 75%] Linking CXX static library libabsl_time.a [ 75%] Built target absl_time [ 75%] Linking CXX static library libabsl_hash.a [ 75%] Built target absl_hash [ 75%] Linking CXX static library libabsl_cord_internal.a [ 75%] Built target absl_cord_internal [ 75%] Linking CXX shared module _errors.cpython-37m-x86_64-linux-gnu.so /usr/bin/ld: unrecognized option '-plugin' /usr/bin/ld: use the --help option for usage information clang-14: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: [_errors.cpython-37m-x86_64-linux-gnu.so] Error 1 gmake[1]: [CMakeFiles/_errors.dir/all] Error 2 [ 75%] Linking CXX shared module _enums.cpython-37m-x86_64-linux-gnu.so /usr/bin/ld: unrecognized option '-plugin' /usr/bin/ld: use the --help option for usage information clang-14: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: [_enums.cpython-37m-x86_64-linux-gnu.so] Error 1 gmake[1]: [CMakeFiles/_enums.dir/all] Error 2 gmake: [all] Error 2 Traceback (most recent call last): File "", line 36, in File "", line 34, in File "/tmp/pbs.6440532.pbsserver/pip-req-build-bn1addkc/setup.py", line 321, in 'include/mujoco/*.h', File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/init.py", line 87, in setup return distutils.core.setup(**attrs) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands self.run_command(cmd) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/usr/local/python/3.7.7/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 223, in run self.run_command('build') File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/command/build.py", line 24, in run super().run() File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 132, in run self.run_command(cmd_name) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command self.distribution.run_command(command) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/home/zhc/.local/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 992, in run_command cmd_obj.run() File "/tmp/pbs.6440532.pbsserver/pip-req-build-bn1addkc/setup.py", line 144, in run self._configure_cmake() File "/tmp/pbs.6440532.pbsserver/pip-req-build-bn1addkc/setup.py", line 244, in _configure_cmake cwd=self.build_temp) File "/usr/local/python/3.7.7/lib/python3.7/subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '-j24', '--config', 'Release']' returned non-zero exit status 2. error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. full command: /usr/local/python/3.7.7/bin/python3.7 -u -c ' exec(compile('"""""" This is -- a caller that pip uses to run setup.py # # - It imports setuptools before invoking setup.py, to enable projects that directly # import from distutils.core to work with newer packaging standards. # - It provides a clear error message when setuptools is not installed. # - It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so # setuptools doesn'"'"'t think the script is -c. This avoids the following warning: # manifest_maker: standard file '"'"'-c'"'"' not found". # - It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'/tmp/pbs.6440532.pbsserver/pip-req-build-bn1addkc/setup.py'"'"',), "", "exec"))' bdist_wheel -d /tmp/pbs.6440532.pbsserver/pip-wheel-d1r6m3tv cwd: /tmp/pbs.6440532.pbsserver/pip-req-build-bn1addkc/ error ERROR: Failed building wheel for mujoco Running setup.py clean for mujoco Running command python setup.py clean running clean removing 'build/temp.linux-x86_64-cpython-37' (and everything under it) removing 'build/lib.linux-x86_64-cpython-37' (and everything under it) 'build/bdist.linux-x86_64' does not exist -- can't clean it 'build/scripts-3.7' does not exist -- can't clean it removing 'build' Failed to build mujoco ERROR: Failed to build one or more wheels Exception information: Traceback (most recent call last): File "/home/zhc/.local/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper status = run_func(*args) File "/home/zhc/.local/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper return func(self, options, args) File "/home/zhc/.local/lib/python3.7/site-packages/pip/_internal/commands/wheel.py", line 176, in run raise CommandError("Failed to build one or more wheels") pip._internal.exceptions.CommandError: Failed to build one or more wheels Remote version of pip: 22.2.2 Local version of pip: 22.2.2 Was pip installed by pip? True Removed build tracker: '/tmp/pbs.6440532.pbsserver/pip-build-tracker-ey5d2xv0'

raviwaarr commented 1 year ago

I am stuck with installing mujoco on apple siliicon m1

Building wheels for collected packages: mujoco Building wheel for mujoco (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [68 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-cpython-311 creating build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/viewer.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/renderer.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/renderer_test.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/init.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/rollout.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/rollout_test.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/bindings_test.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/viewer_test.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/render_test.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco copying mujoco/gl_context.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco creating build/lib.macosx-10.9-x86_64-cpython-311/mujoco/cgl copying mujoco/cgl/cgl.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco/cgl copying mujoco/cgl/init.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco/cgl creating build/lib.macosx-10.9-x86_64-cpython-311/mujoco/egl copying mujoco/egl/init.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco/egl copying mujoco/egl/egl_ext.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco/egl creating build/lib.macosx-10.9-x86_64-cpython-311/mujoco/osmesa copying mujoco/osmesa/init.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco/osmesa creating build/lib.macosx-10.9-x86_64-cpython-311/mujoco/glfw copying mujoco/glfw/init.py -> build/lib.macosx-10.9-x86_64-cpython-311/mujoco/glfw running build_ext Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/private/var/folders/25/3c_cvnxx415_zr7xxz5k1_zh0000gn/T/pip-install-pscr4xgl/mujoco_d4b94e5e211c43dcbadb4e0ddb330867/setup.py", line 418, in setup(SETUP_KWARGS) File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/init.py", line 103, in setup return distutils.core.setup(attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/Users/raviwar/miniconda/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 364, in run self.run_command("build") File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run self.run_command(cmd_name) File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/Users/raviwar/miniconda/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/25/3c_cvnxx415_zr7xxz5k1_zh0000gn/T/pip-install-pscr4xgl/mujoco_d4b94e5e211c43dcbadb4e0ddb330867/setup.py", line 156, in run self._mujoco_framework_path) = self._find_mujoco() ^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/25/3c_cvnxx415_zr7xxz5k1_zh0000gn/T/pip-install-pscr4xgl/mujoco_d4b94e5e211c43dcbadb4e0ddb330867/setup.py", line 170, in _find_mujoco raise RuntimeError( RuntimeError: MUJOCO_PATH environment variable is not set [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for mujoco Running setup.py clean for mujoco Failed to build mujoco

bennevans commented 12 months ago

@raviwaarr Make sure to set your environment variables MUJOCO_PATH and MUJOCO_PLUGIN_PATH to point to the correct directories (the root mujoco path like /home/users/ben/.mujoco/mujoco-3.0.0 and /home/users/ben/.mujoco/mujoco-3.0.0/bin/mujoco_plugin for example)

ocg2347 commented 11 months ago

best not use conda environments if possible. I switched to python venv and nothing went wrong :)