1.在控制台(cmd)输入
conda info -e
2.conda create --name snake python=3
##系统会自动在envs目录下创建文件夹snake
3.通过指令activat和deactivate能够切换环境
代码如下:
C:\Users\Administrator>conda -V
conda 4.6.9
C:\Users\Administrator>python -V
Python 2.7.13 :: Anaconda 4.0.0 (64-bit)
C:\Users\Administrator>conda info -e
# conda environments:
#
base * F:\Anaconda2
gl-env F:\Anaconda2\envs\gl-env
C:\Users\Administrator>conda create --name snake python=3
##python=3,这样写的好处是系统会自动下载和你环境匹配的python3.*
#
# To activate this environment, use:
# > activate snake
#
# To deactivate an active environment, use:
# > deactivate
#
# * for power-users using bash, you must source
#
验证是否安装成功
C:\Users\Administrator>conda -V
conda 4.6.9
C:\Users\Administrator>python -V
Python 2.7.13 :: Anaconda 4.0.0 (64-bit)
C:\Users\Administrator>activate snake
(snake) C:\Users\Administrator>conda -V
conda 4.6.9
(snak