Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install mujoco, mujoco_py, mujoco_py_derivs
#!/usr/bin/env bash
# Assume:
# - mjkey.txt is in directory $MJKEYDIR
# Install MuJoCo
mkdir -p $HOME/.mujoco
unzip -d $HOME/.mujoco
mv $HOME/.mujoco/mujoco200_linux $HOME/.mujoco/mujoco200
cp $MJKEYDIR/mjkey.txt ~/.mujoco
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.mujoco/mujoco200/bin
# Install mujoco-py
sudo apt-get update
sudo apt-get install -y patchelf python3 python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libglew1.5 libglew-dev python3-pip libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev python3-numpy python3-scipy python3-dbg gdb
pip install mujoco-py gym
# Test in python
# import gym
# env = gym.make('FetchPush-v1')
# env.reset()
# for _ in range(1000):
# env.step(env.action_space.sample()) # take a random action
# Install mujoco_py_deriv
git clone
pushd mujoco_py_deriv
pip install -e .
# Test
python tests/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment