赞
踩
去清华镜像下载anaconda3_4.3.0-linux-x86_64.sh,然后在终端中输入以下命令进行安装:
cd downloads
bash anaconda3_4.3.0-linux-x86_64.sh
//gymlab是自己起的虚拟环境名称 python=x.y指定python版本
conda create --name gymlab python=3.5
先重新打开一个终端,然后遵循以下步骤:
source activate gymlab
pip install gym[all]
这一步可能会出错
比如:提醒pip版本低,使用如下命令更新:
python -m pip install --upgrade pip
继续安装,不出意外,还会报错:
Failed building wheel for mujoco-py
这个需要自行安装一下mujoco,可以参考这个方法:
Mujoco以及mujoco_py的安装
安装完成之后,重新执行:
pip install gym[all]
保持网络畅通,等待安装完成,看到如下信息,说明安装完成。
Requirement already satisfied: mujoco-py>=1.50; extra == "all" in /home/xtq/mujoco-py (from gym[all]) (1.50.1.65)
Requirement already satisfied: PyOpenGL; extra == "all" in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from gym[all]) (3.1.0)
Requirement already satisfied: future in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from pyglet>=1.2.0->gym[all]) (0.17.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from requests>=2.0->gym[all]) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from requests>=2.0->gym[all]) (2018.8.24)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from requests>=2.0->gym[all]) (1.24)
Requirement already satisfied: idna<2.8,>=2.5 in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from requests>=2.0->gym[all]) (2.7)
Requirement already satisfied: glfw>=1.4.0 in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from mujoco-py>=1.50; extra == "all"->gym[all]) (1.7.0)
Requirement already satisfied: Cython>=0.27.2 in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from mujoco-py>=1.50; extra == "all"->gym[all]) (0.29)
Requirement already satisfied: cffi>=1.10 in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from mujoco-py>=1.50; extra == "all"->gym[all]) (1.11.5)
Requirement already satisfied: lockfile>=0.12.2 in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from mujoco-py>=1.50; extra == "all"->gym[all]) (0.12.2)
Requirement already satisfied: pycparser in /home/xtq/anaconda3/envs/gymlab/lib/python3.5/site-packages (from cffi>=1.10->mujoco-py>=1.50; extra == "all"->gym[all]) (2.19)
Installing collected packages: atari-py, box2d-py, gym
Successfully installed atari-py-0.1.6 box2d-py-2.3.5 gym-0.10.8
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。