速記
1. 安裝
Miniconda 是Conda最精簡的版本,為了避免引入大量不必要的庫,這里我們使用Miniconda進(jìn)行安裝。關(guān)于Miniconda介紹如下:
Miniconda installers contain the conda package manager and Python.
Once Miniconda is installed, you can use the conda command to install any other packages and create environments.
可以看出,一旦我們安裝了Miniconda ,我們就可以為所欲為了。
Miniconda 官方下載地址請點(diǎn)擊這里:Miniconda 官方下載地址,下載之后一路綠燈安裝即可。
如下,官方提供了兩個版本的Installer,我們?nèi)芜x其一安裝即可。

安裝好后,如果想安裝多版本Python,繼續(xù)安裝另一版本即可(下面詳細(xì)介紹)。關(guān)于兩版本安裝先后的區(qū)別如下:
The other difference is that the Python 3 version of Miniconda will default to Python 3 when creating new environments and building packages.
這里采用首先安裝好Pyhon3后舉例說明如何安裝Python2版本,Cmd 操作如下:
# 安裝 python 2.7
$ conda create -n python2 python=2.7
# 切換至 python 2.7
$ activate python2
# 退出 python 2.7
$ deactivate
# 安裝第三方包
$ conda install xxxx
默認(rèn)環(huán)境為 python 3.7 ,Conda 其他常用操作命令請自行百度。
2. 關(guān)于目錄結(jié)構(gòu)簡單介紹
比如我的miniconda安裝目錄在D:\software\miniconda。則:
python3.7 的可執(zhí)行文件位置為:D:\software\miniconda\python.exe
python2.7 的可執(zhí)行文件位置為:D:\software\miniconda\envs\python2\python.exe
構(gòu)建項目時可通過切換可執(zhí)行文件切換python環(huán)境。
通過conda下載的第三方包位置為:
python3.7 :D:\software\miniconda\Lib\site-packages
python2.7 :D:\software\miniconda\envs\python2\Lib\site-packages
是不是很簡單?