Skip to content
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

[Tutorial]: Tested solution for install mujoco_py on linux server without root, Enjoy #803

Open
Josh00-Lu opened this issue Aug 19, 2024 · 1 comment

Comments

@Josh00-Lu
Copy link

Josh00-Lu commented Aug 19, 2024

Recommendation:
Ubuntu, Conda

## Create conda
conda create -n demo python=3.9 mesalib glew glfw -c conda-forge -y
conda activate demo

## Install mujoco dependency
USER_DIR=$USER
echo $USER_DIR
wget -c "https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz"
mkdir -p /home/$USER_DIR/.mujoco
cp mujoco210-linux-x86_64.tar.gz /home/$USER_DIR/mujoco.tar.gz
rm mujoco210-linux-x86_64.tar.gz
mkdir -p /home/$USER_DIR/.mujoco
tar -zxvf /home/$USER_DIR/mujoco.tar.gz -C /home/$USER_DIR/.mujoco
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/$USER_DIR/.mujoco/mujoco210/bin" >> ~/.bashrc
echo "export MUJOCO_PY_MUJOCO_PATH=/home/$USER_DIR/.mujoco/mujoco210" >> ~/.bashrc

# activate 
source ~/.bashrc
conda activate demo

#  install 
export CC="/usr/bin/gcc"
pip install "mujoco_py>=2.0"
pip install "cython<3"

# compile mujoco using gcc
python
import mujoco_py

Tested: Ubuntu 22.04.4 LTS

Good luck, enjoy.

@Josh00-Lu Josh00-Lu changed the title [Tutorial]: Tested solution for install mujoco_py on current linux server without root, Enjoy [Tutorial]: Tested solution for install mujoco_py on current linux server without root, Enjoy Aug 19, 2024
@Josh00-Lu Josh00-Lu changed the title [Tutorial]: Tested solution for install mujoco_py on current linux server without root, Enjoy [Tutorial]: Tested solution for install mujoco_py on linux server without root, Enjoy Aug 19, 2024
@varungupta31
Copy link

@Josh00-Lu
Thank you so much!
Finally able to run mujoco.

<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants