Closed Saptam04 closed 2 years ago
I've gone to the same error as you and finally found a fix, first the fix for a local setup won't work here for colab.
The real fix is to not do the old way of installing mujoco with the key and the binaries, causing dependencies and path issues.
Now that it is free, you can just do
!pip install free-mujoco-py
Without having to care about mjkey/environments variables.
You can check this example to make sure you are not missing any libraries or adding some useless one. https://colab.research.google.com/drive/1KGMZdRq6AemfcNscKjgpRzXqfhUtCf-V?usp=sharing#scrollTo=3qeAEFtTG8dV
Should be fixed after that, tag me if it's not.
I should add that installing free-mujoco isn't something you add on the top of the other installation, otherwise it won't work, just get rid of the old files and do like in the notebook.
Hope it helps.
@atonkamanda Thanks for the fix. In fact shortly after posting it, I found out this Reddit post and this pull request where they point to this exact notebook.
A bit of a rant: now that MuJoCo is freely available (kudos Deepmind), I think the authors and the maintainers REALLY should try to put in some effort to make it a little bit more user-friendly. As it stands, it is undoubtedly a hassle to install it even on the most popular platforms like Ubuntu and Debian. I recently had the opportunity of installing it on a Manjaro-based system, and I can confirm that it was truly a nightmare!
I've gone to the same error as you and finally found a fix, first the fix for a local setup won't work here for colab. The real fix is to not do the old way of installing mujoco with the key and the binaries, causing dependencies and path issues. Now that it is free, you can just do
!pip install free-mujoco-py
Without having to care about mjkey/environments variables. You can check this example to make sure you are not missing any libraries or adding some useless one. https://colab.research.google.com/drive/1KGMZdRq6AemfcNscKjgpRzXqfhUtCf-V?usp=sharing#scrollTo=3qeAEFtTG8dV Should be fixed after that, tag me if it's not.
yep, this works for me. thank you very much!
!apt-get install -y \
libgl1-mesa-dev \
libgl1-mesa-glx \
libglew-dev \
libosmesa6-dev \
software-properties-common
!apt-get install -y patchelf
!pip install free-mujoco-py
Describe the bug I'm trying to install
MuJoCo
on Google Colab. I followed all the steps mentioned inmujoco-py
's GitHub page (i.e. setting the environment variables and installing additional packages). When I importmujoco_py
or usegym.make()
I get the following GCC error:I see that the same issue has been raised many times in the past (e.g. this and this). Does anybody know how to get it to run on Colab?
To Reproduce Download MuJoCo and install
mujoco-py
.Expected behavior A fresh MuJoCo installation.
Error Messages Following is the full error message:
Desktop
Environment
echo $LD_LIBRARY_PATH
/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/root/.mujoco/mujoco211/bin
echo $HOME
/root
echo $USER
No output.Additional context I installed the following additional packages as suggested in the Docker file:
PS: I tried to downgrade
mujoco-py
. All of the versions from2.0.2.13
to2.0.2.9
even fails to install usingpip
. Version2.0.2.8
installs, but produces the same error mentioned above.