- 查看已安装的环境:
conda info -e
或
conda env list
- 创建新环境gymlab:
conda create -n gymlab python=3.5
- 激活环境gymlab:
conda activate gymlab
- 查看当前环境的python版本:
(gymlab) root@a40c0e2ff492:~/Desktop/gym# python --version
Python 3.5.6 :: Anaconda, Inc.
- 退出当前环境:
conda deactivate
- 删除环境gymlab
conda env remove -n gymlab
- 在conda中安装gym:
1. conda create -n gymlab python=3.5 创建一个conda环境:gymlab
2. conda activate gymlab # 激活gymlab环境
3. pip安装gym(按照[gym官方]( http://gym.openai.com/docs/)的pip方式安装)
4. conda list # 查看是否安装成功
5. conda deactivate # 退出当前环境
6. 在pycharm中选择gymlab环境:File >> Setting >> Project Interpreter >> Conda Environment >> Exiting environment >> Interpreter 选择 /headless(yourname)/anaconda3/envs/gymlab/bin/python3.5