Conda 常用命令整理
阿新 • • 發佈:2021-11-08
目錄
conda 版本
conda --version
conda -V
conda 命令幫助
conda update --help
conda remove --help
例如conda info --help
C:\Users\1\Desktop>conda info --help usage: conda-script.py info [-h] [--json] [-v] [-q] [-a] [--base] [-e] [-s] [--unsafe-channels] Display information about current conda install. Options: optional arguments: -h, --help Show this help message and exit. -a, --all Show all information. --base Display base environment path. -e, --envs List all known conda environments. -s, --system List environment variables. --unsafe-channels Display list of channels with tokens exposed. Output, Prompt, and Flow Control Options: --json Report all output as json. Suitable for using conda programmatically. -v, --verbose Use once for info, twice for debug, three times for trace. -q, --quiet Do not display progress bar.
環境管理
檢視已配置的python環境
conda info --envs
conda env list
C:\Users\1\Desktop>conda info --envs
# conda environments:
#
base * F:\Devs\Anaconda3
py2 F:\Devs\Anaconda3\envs\py2
建立環境
conda create --name your_env_name
創建制定python版本的環境
conda create --name your_env_name python=2.7 conda create --name your_env_name python=3 conda create --name your_env_name python=3.5
建立包含某些包的環境
conda create --name your_env_name numpy scipy
建立指定python版本下包含某些包的環境
conda create --name your_env_name python=3.5 numpy scipy
進入某個環境
source activate your_env_name
退出當前環境
source deactivate
參考
Conda常用命令整理---建立環境----conda create --name your_env_name python=3.7