728x90
https://github.com/deepmind/mujoco/releases
Mujoco_py pip ์ค์น ์ ์ํ ์์
https://github.com/openai/mujoco-py/issues/662
1. [2.1.1] (https://github.com/deepmind/mujoco/releases/tag/2.1.1) ํ์ผ ์ค์น
1) mac ์ ์ฉ [mujoco-2.1.1-macos-universal2.dmg] ํ์ผ ์ค์น
2) dmg ์ค์น ํ Mujoco ํ์ผ Application์ผ๋ก ์ด๋
2. 2.1.* ๋ฒ์ ์ดํ์์๋ .mujoco๋ฅผ ์ฝ์ด python์์ ์๋ ๊ฐ์ ๋ฐฉ์์ผ๋ก ln -sf๋ก ์ฐ๊ฒฐ
mkdir -p $HOME/.mujoco/mujoco210 # Remove existing installation if any
ln -sf /Applications/MuJoCo.app/Contents/Frameworks/MuJoCo.framework/Versions/Current/Headers/ $HOME/.mujoco/mujoco210/include
mkdir -p $HOME/.mujoco/mujoco210/bin
ln -sf /Applications/MuJoCo.app/Contents/Frameworks/MuJoCo.framework/Versions/Current/libmujoco.2.*.dylib $HOME/.mujoco/mujoco210/bin/libmujoco210.dylib
ln -sf /Applications/MuJoCo.app/Contents/Frameworks/MuJoCo.framework/Versions/Current/libmujoco.2.*.dylib /usr/local/lib/
# For M1 (arm64) mac users:
# The released binary doesn't ship glfw3, so need to install on your own
brew install glfw
ln -sf /opt/homebrew/lib/libglfw.3.dylib $HOME/.mujoco/mujoco210/bin
# Please make sure /opt/homebrew/bin/gcc-11 exists: install gcc if you haven't already
# brew install gcc
export CC=/opt/homebrew/bin/gcc-11 # see https://github.com/openai/mujoco-py/issues/605
pip install mujoco-py && python -c 'import mujoco_py'
* gcc-9 2.1์ด์์ ๋ฒ์ ์์๋ ๋๋ถ๋ถ gcc-9 ์ฌ์ฉ์ผ๋ก m1 mac์์ ์ฌ์ฉ์ด ์ด๋ ต๋ค
* ์ค๊ฐ์ permission ์๋ฌ๊ฐ ๋์ค๋ฉด sudo ๊ถํ์ ์ฃผ๊ณ command๋ฅผ ์ ๋ ฅํ๋ฉด ๋๋ค.
import mujoco_py
import gymnasium as gym
import os
mj_path = mujoco_py.utils.discover_mujoco() # path ํ์ธ
env = gym.make('Humanoid-v2', render_mode='rgb_array')
env.reset()
import matplotlib.pyplot as plt
plt.imshow(env.render())
plt.show()
๋ฐ์ํ
'๐พ Deep Learning' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[M1] Whisper.cpp Deploy C++ (ALL OS-) (0) | 2023.04.06 |
---|---|
[RL] Deep Deterministic Policy Gradient (A.K.A DDPG) (0) | 2023.04.04 |
[RL] A3C (๋น๋๊ธฐ Advantage Actor-Critic) ์ ๋ฆฌ (0) | 2023.03.28 |
[RL] A3C (Asynchronous Advantage Actor-Critic) (0) | 2023.03.28 |
[Reinforce Learning] Deep Q-Network (0) | 2023.03.26 |