| 任务 | Conda | Pip |
|---|---|---|
| 安装包 | conda install 包名 |
pip install 包名 |
| 更新包 | conda update [-n 环境名] 包名 |
pip install --upgrade 包名 |
| 更新包管理器 | conda update conda |
Linux:pip install -U pip* |
| 卸载包 | conda remove [-n 环境名] 包名 |
pip uninstall 包名 |
| 创建环境 | conda create -n 环境名 python=x.x |
X |
| 激活环境 |
conda activate 环境名** |
X |
| 退出环境 | conda deactivate |
X |
| 查找包 | conda search $SEARCH_TERM |
pip search $SEARCH_TERM |
| 从指定源安装包 | conda install --channel $URL 包名 |
pip install --index-url $URL 包名 |
| 列出已安装的包 | conda list [-n 环境名] |
pip list |
| 创建环境配置文件 | conda list --export |
pip freeze |
| 列出所有环境 | conda info -e |
X |
| 安装其他管理器 | conda install pip |
pip install conda |
| 安装Python | conda install python=x.x |
X |
| 更新Python |
conda update python*** |
X |
* Windows:
python -m pip install -U pip
**conda activate用于conda 4.6 及以后版本。4.6之前版本,Windows:activateLinux:source activate
***conda update python会把python升级到当前系列的最高版本













网友评论