|
|
@@ -1,6 +1,65 @@
|
|
|
---
|
|
|
-title: "conan"
|
|
|
+title: "conda 基本命令"
|
|
|
date: 2023-09-01T16:11:48+07:00
|
|
|
-draft: true
|
|
|
+draft: false
|
|
|
---
|
|
|
|
|
|
+## 安装(miniconda)
|
|
|
+
|
|
|
+[下载地址](https://docs.conda.io/projects/miniconda/en/latest/index.html)
|
|
|
+
|
|
|
+## 配置
|
|
|
+
|
|
|
+- 禁止自动激活base 虚拟环境
|
|
|
+```shell
|
|
|
+conda config --set auto_activate_base false
|
|
|
+```
|
|
|
+
|
|
|
+## 基本命令
|
|
|
+
|
|
|
+```shell
|
|
|
+
|
|
|
+# 创建虚拟环境
|
|
|
+conda create -n myenv python=3.9
|
|
|
+
|
|
|
+# 激活虚拟环境
|
|
|
+conda activate myenv
|
|
|
+
|
|
|
+# 关闭虚拟环境
|
|
|
+conda deactivate
|
|
|
+
|
|
|
+# 删除虚拟环境
|
|
|
+conda remove -n myenv --all
|
|
|
+
|
|
|
+# 查看虚拟环境
|
|
|
+conda info -e
|
|
|
+conda env list
|
|
|
+
|
|
|
+########
|
|
|
+# 更新conda
|
|
|
+conda update conda
|
|
|
+conda update anaconda
|
|
|
+
|
|
|
+# 搜索包
|
|
|
+conda search --full-name packagename
|
|
|
+# 安装包
|
|
|
+conda install scipy
|
|
|
+# 更新包
|
|
|
+conda update scipy
|
|
|
+# 更新所有
|
|
|
+conda update --all
|
|
|
+# 查看已安装的包
|
|
|
+conda list
|
|
|
+# 导出当前环境包信息
|
|
|
+conda env export > env.yaml
|
|
|
+# 用配置文件创建虚拟环境
|
|
|
+conda env create -f env.yaml
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+```shell
|
|
|
+# 查看帮助
|
|
|
+conda -h
|
|
|
+# config 命令帮助
|
|
|
+conda config -h
|
|
|
+```
|