- 查看已安装的环境:
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:
- conda create -n gymlab python=3.5 创建一个conda环境:gymlab
- conda activate gymlab # 激活gymlab环境
- pip安装gym(按照gym官方的pip方式安装)
- conda list # 查看是否安装成功
- conda deactivate # 退出当前环境
- 在pycharm中选择gymlab环境:File >> Setting >> Project Interpreter >> Conda Environment >> Exiting environment >> Interpreter 选择 /headless(yourname)/anaconda3/envs/gymlab/bin/python3.5
原文地址:https://www.cnblogs.com/yangzhaonan/p/10415252.html
时间: 2024-11-03 16:52:26