# Miniconda

# 环境变量

有时在 Windows 上安装完之后环境变量 (opens new window)并没有被设置好,需要手动在 PATH 中加入

%USERPROFILE%\miniconda3
%USERPROFILE%\miniconda3\Library\bin
%USERPROFILE%\miniconda3\Scripts

重新打开命令行,然后执行

conda init

对于 PowerShell,还需以管理员权限执行

set-executionpolicy remotesigned

以允许在启动时运行 conda 初始化脚本

SUSTech Anaconda Mirror (opens new window)

# 常用包

scipy numpy pandas matplotlib scikit-learn notebook

# Managing environments

# Create an environment
# Notation: <required argument> [optional argument]
# `-n` is short for `--name`
conda create -n <env_name> [python=3.6] [--clone <another_env>]
conda env list
conda activate <env_name>
conda env remove -n <env_name>

See Manage environments — conda (opens new window)

# Managing packages

conda search <pkg_name>             ## search for available packages
conda install <pkg_name ...>
conda list [regex] [-n <env_name>]  ## list packages in, by default, the current environment
conda remove <pkg_name ...>

For comparison

pip install <pkg_name ...>
pip show <pkg_name ...>
pip uninstall <pkg_name ...>
Last updated: 8/24/2023, 4:36:11 PM