安装教程conda create新增默认的/envs下面,而不只是只能要额外指定路径 用-p (#482)

* Update 安装教程中conda虚拟环境的创建与激活
This commit is contained in:
YuhaoWU 2023-07-25 16:58:25 +08:00 committed by GitHub
parent 18d453cc18
commit 466f0c9c97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -87,6 +87,10 @@ $ conda create -p /your_path/env_name python=3.8
# Activate the environment # Activate the environment
$ source activate /your_path/env_name $ source activate /your_path/env_name
# or, do not specify an env path, note that /your_path/env_name is to be replaced with env_name below
$ conda create -n env_name python=3.8
$ conda activate env_name # Activate the environment
# Deactivate the environment # Deactivate the environment
$ source deactivate /your_path/env_name $ source deactivate /your_path/env_name

View File

@ -12,6 +12,12 @@ $ conda create -p /your_path/env_name python=3.8
# 激活环境 # 激活环境
$ source activate /your_path/env_name $ source activate /your_path/env_name
# 或conda安装不指定路径, 注意以下,都将/your_path/env_name替换为env_name
$ conda create -n env_name python=3.8
$ conda activate env_name # Activate the environment
# 更新py库
$ pip3 install --upgrade pip $ pip3 install --upgrade pip
# 关闭环境 # 关闭环境