First install Anaconda, when its installation is successful, you can test in cmd whether the installation is successful, Conda--versionconda Environment Management Conda Environment Management feature allows us to install several different versions of Python at the same time, and can switch freely. Suppose we need to install Python 3.6, at this point we need to do the following:
# 创建一个名为python36的环境,指定Python版本是3.6(不用管是3.6.x,conda会为我们自动寻找3.6.x中的最新版本)conda create --name python36 python=3.6 # 安装好后,使用activate激活某个环境activate python36 # for Windowssource activate python36 # for Linux & Mac# 激活后,会发现terminal输入的地方多了python36的字样,实际上,此时系统做的事情就是把默认3.5环境从PATH中去除,再把3.6对应的命令加入PATH # 此时,再次输入python --version# 可以得到`Python 3.6 :: Anaconda 4.1.1 (64-bit)`,即系统已经切换到了3.6的环境 # 如果想返回默认的python 3.5环境,运行deactivate # for Windowssource deactivate python36 # for Linux & Mac # 删除一个已有的环境conda remove --name python36 --all
Python's Anaconda version management