-
Notifications
You must be signed in to change notification settings - Fork 76
Installing Mujoco py on Linux
pz1004 edited this page Aug 19, 2018
·
4 revisions
OS: Ubuntu 16.04 / x86_64
python version: 3.6
pytorch : 0.4.0
MuJoCo version: 150
sudo apt install -y build-essential autoconf libtool pkg-config python-opengl python-pil \
python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 \
libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl \
libgle3 python-dev libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev python3-scipy libglew-dev patchelf
replace pgtravel
with your favor name.
$ virtualenv pgtravel -p python3.6
$ source pgtravel/bin/activate
git clone https://github.com/openai/gym.git
cd gym
pip install -e .
- Download MuJoCo-pro 150 version. download
- Unzip
mjpro150_linux.zip
file to$HOME/.mujoco/mjpro150/
- successful structure is below:
- Setup Environment Variable
- Write below command in
~/.bashrc
file -
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.mujoco/mjpro150/bin
- Write below command in
- Get 30-day Trial license
- Obtain a computer id using the getid_linux program.
- Obtain the Mujoco license with the computer id.
- After successful submission, you get an e-mail from 'Roboti LLC Licensing' containing the trial license file
mjkey.txt
. Be careful not to leak.- Submit result
- E-mail from 'Roboti LLC Licensing'
- Download
mjkey.txt
from the email and move it to~/.mujoco/
- [Optional] Test Activation Key
-
$ cp mjkey.txt ~/.mujoco/mjpro150/bin/ cd $HOME/.mujoco/mjpro150/bin ./simulate
-
$ git clone https://github.com/openai/mujoco-py.git
$ cd mujoco-py
$ python3 setup.py install
[Optional] Test mujoco-py
$ python3
>> import mujoco_py
>> import gym
>> env = gym.make('Hopper-v2') # or 'Humanoid-v2'
>> env.render()
- If
CompileError
aboutgcc
orcython
raises, then, try to re-installmujoco-py
.
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-linux_x86_64.whl
pip3 install torchvision
$ git clone https://github.com/reinforcement-learning-kr/pg_travel
$ pip install tensorboardX
$ pip install tensorflow
It's helpful references for me to make shared folder in virtualbox.
- https://askubuntu.com/questions/161759/how-to-access-a-shared-folder-in-virtualbox
- https://extrememanual.net/10063
$ sudo gpasswd -a [user_name] vboxsf