git clone https://github.com/openai/gym.git
sudo apt-get install -y cmake zlib1g-dev libjpeg-dev xvfb xorg-dev python-opengl libboost-all-dev libsdl2-dev swig
进入gym文件夹,打开setup.py,将17、18行注释掉(这两行的mujoco和robotics需注册才能安装,但笔者暂时不需要用)。
cd gym
gedit setup.py
# "mujoco": ["mujoco_py>=1.50, <2.0"],
# "robotics": ["mujoco_py>=1.50, <2.0"],
pip install –e '.[all]'